Page tree
Skip to end of metadata
Go to start of metadata

This feature requires at least openITCOCKPIT Version 4.0 to be available.


What can I do with the Mattermost module?

This module provides a Two-Way integration of Mattermost into openITCOCKPIT. Alerts can be send out via Mattermost. And Acknowledgements can be sent from Mattermost to openITCOCKPIT.


What can I configure?

Under "API / Mattermost" you can find the settings for the Mattermost module.


Field name

Required FieldDescription

Webhook URL

(warning)

Defines the address of the Mattermost server to which the module sends the notifications

Example: http://192.168.122.1/hooks/1nmqus1wsfr988e81sr8whqrte

Enable Two-Way Integration

Via the Two-Way Integration Mattermost is able, to acknowledge host and service problems.

For this option it is required, that your openITCOCKPIT Server is accessible from the Mattermost Server.

openITCOCKPIT API Key

This API Key will be used by Mattermost to send the acknowledge commands

You need to create an openITCOCKPIT user defined API key first.

Use Proxy Server
Determine if the configured proxy should be used


Configure Mattermost

Create a new Bot Account (or normal user) for openITCOCKPIT in your Mattermost installation.

In the next setp create a new Incoming Webhook.

If you click on "Save" the system will display the Webhook URL. For Example: http://192.168.122.1/hooks/1nmqus1wsfr988e81sr8whqrte. Copy this URL to a notepad you will need it later.


Self-signed certificate or private IP-Addresses

If you are using a private IP-Addresses make sure to add the Network or IP-Address of your openITCOCKPIT Server into AllowedUntrustedInternalConnections in your Mattermost's config.json.

"AllowedUntrustedInternalConnections": "192.168.122.32",

See also: Allow untrusted internal connections to


To use self-signed certificates you have to enable EnableInsecureOutgoingConnections in your Mattermost's config.json.

"EnableInsecureOutgoingConnections": true,

See also: Enable Insecure Outgoing Connections

Configure openITCOCKPIT

Open the Mattermost Module Configuration and fill out the required fields.


Commands

The following commands must be used for the notification.

However, these should already have been created during the module installation.


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$"



  • No labels