Skip to content

🤖 AI-Assisted Content Notice

This documentation was generated with the assistance of artificial intelligence and has been human-reviewed for accuracy.

Mattermost CE¶

What can I do with the Mattermost module?¶

This module offers the possibility of setting up a two-way integration of Mattermost in openITCOCKPIT. Alerts can be sent to Mattermost and acknowledgments can be sent from Mattermost to openITCOCKPIT.

What can I configure?¶

You can find the configuration under "API Mattermost".

Name field Required field Description
Webhook URL âš  Defines the address of the Mattermost server to be used. **
Example**: http://192.168.122.1/hooks/1nmqus1wsfr988e81sr8whqrte
Enable Two-Way Integration Mattermost can send acknowledgements to openITCOCKPIT using the two-way integration feature. If this is not enabled, only alerts will be sent to Mattermost.
openITCOCKPIT API Key This API key is used by Mattermost to send acknowledgements to openITCOCKPIT. First a custom, user-defined API key has to be created with openITCOCKPIT
Use Proxy Server Decide whether the configured HTTP proxy should be used or not.

Mattermost configuration¶

Create a new bot account (oder normalen Benutzer) (or normal user account) for openITCOCKPIT in your Mattermost environment. Now create a new incoming webhook.

Once you click "Save", Mattermost will present you with a webhook URL. For Example: http://192.168.122.1/hooks/1nmqus1wsfr988e81sr8whqrte. Copy this into a text file. You will need it later.

Self-signed certificates or private IP addresses¶

If you are using private IP addresses, you must first add the network or IP address of your openITCOCKPIT server to the configuration key AllowedUntrustedInternalConnections in your Mattermost's config.json.

"AllowedUntrustedInternalConnections": "192.168.122.32",

Also read: Allow untrusted internal connections to

When using self-signed certificates, you need to enable EnableInsecureOutgoingConnections option in your Mattermost's config.json.

"EnableInsecureOutgoingConnections": true,

Also read: Enable Insecure Outgoing Connections

openITCOCKPIT configuration¶

Open the Mattermost Module configuration and fill in the required fields.

Commands¶

The following commands must be used for notifications.

These should be created automatically when the module is installed.

Host:

Host Notification Command - openITCOCKPIT Version 4.0

/usr/share/openitcockpit/app/cake4/bin/cake MattermostModule.mattermost_notification --type Host --notificationtype "$NOTIFICATIONTYPE$" --hostuuid "$HOSTNAME$" --state "$HOSTSTATEID$" --output "$HOSTOUTPUT$" --ackauthor "$NOTIFICATIONAUTHOR$" --ackcomment "$NOTIFICATIONCOMMENT$"

Service:

Service Notification Command - openITCOCKPIT Version 4.0

/usr/share/openitcockpit/app/cake4/bin/cake MattermostModule.mattermost_notification --type Service --notificationtype "$NOTIFICATIONTYPE$" --hostuuid "$HOSTNAME$" --serviceuuid "$SERVICEDESC$" --state "$SERVICESTATEID$" --output "$SERVICEOUTPUT$" --ackauthor "$NOTIFICATIONAUTHOR$" --ackcomment "$NOTIFICATIONCOMMENT$"