Mattermost is het team communicatie platform binnen ASD-PMA. Het biedt real-time chat, channels, directe berichten en integraties met andere services.
| Eigenschap | Waarde |
|---|---|
| Poort | 9107 |
| Container | asd-mattermost |
| Database | PostgreSQL (asd-mattermost-postgres) |
| Health endpoint | /api/v4/system/ping |
| Categorie | Communication |
| Classificatie | Primary |
| Channel | Doel |
|---|---|
#town-square |
Algemene aankondigingen |
#off-topic |
Informele gesprekken |
#dev |
Development discussies |
#tickets |
Ticket notificaties (via n8n) |
#alerts |
Systeem alerts |
Voor notificaties vanuit andere systemen:
# n8n stuurt naar Mattermost
POST https://mattermost.example.com/hooks/xxx-yyy-zzz
{
"channel": "tickets",
"username": "Redmine Bot",
"icon_url": "https://redmine.org/favicon.ico",
"text": "Nieuw ticket: #123 - Bug in login"
}
Voor commands vanuit Mattermost:
# Trigger woord: !ticket
# Callback URL: http://asd-n8n:5678/webhook/mattermost-ticket
# Via System Console of CLI
docker exec asd-mattermost mmctl auth login \
http://localhost:8065 \
--name local \
--username admin \
--password-file /tmp/password
# Health check
curl -s "http://localhost:9107/api/v4/system/ping" | jq .
# Lijst channels (met token)
curl -s "http://localhost:9107/api/v4/channels" \
-H "Authorization: Bearer YOUR_TOKEN" | jq .
# Post bericht
curl -X POST "http://localhost:9107/api/v4/posts" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "CHANNEL_ID",
"message": "Hello from API!"
}'
| Command | Omschrijving |
|---|---|
just start mattermost |
Start Mattermost |
just stop mattermost |
Stop Mattermost |
just status mattermost |
Bekijk status |
just logs mattermost |
Bekijk logs |
just info mattermost |
Service info |
just backup mattermost |
Backup database |
Mattermost gebruikt GitLab OAuth settings voor SSO:
sso:
type: mattermost
redirect_path: /signup/gitlab/complete
quirks:
- Uses GitLab OAuth settings (MM_GITLABSETTINGS_*)
- AuthEndpoint = PUBLIC URL
- TokenEndpoint/UserAPI = INTERNAL Docker URL
# SSO toevoegen
just sso-add mattermost
# SSO testen
just sso-test mattermost
Mattermost workflows in n8n:
| Workflow | Trigger | Actie |
|---|---|---|
| Ticket Notificatie | Redmine webhook | Post naar #tickets |
| Alert Handler | Grafana webhook | Post naar #alerts |
| Daily Standup | Cron 9:00 | Reminder in #dev |
| Command Handler | Outgoing webhook | Verwerk !commands |
# Check websocket status
curl -s "http://localhost:9107/api/v4/websocket"
# Logs bekijken
just logs mattermost | grep -i websocket
# Resource gebruik
docker stats asd-mattermost
# Database connections
docker exec asd-mattermost-postgres psql -U mattermost \
-c "SELECT count(*) FROM pg_stat_activity;"