Mattermost Plugins in Beta! (Server v4.4.0)

Mattermost v4.4 supports plugins, which allow users to customize and extend the platform by adding specific features.

There are three scenarios in which you would consider using a plugin:

  • When you want to customize the Mattermost user interface
  • When you want to extend Mattermost functionality to meet a specific, complex requirement
  • When you want to build integrations that are managed by your Mattermost server

There are two main types of plugins:

  • Client plugins: Allows you to customize the Mattermost user interface, by overriding elements such as the profile popover, channel header or the sidebar.
  • Server plugins: Makes it easier to integrate with third-party systems such as JIRA, GitLab or Jenkins.

For a sample plugin, see our Zoom plugin.

Later in upcoming releases, the Enterprise Edition will support server plugins that enable you to extend Mattermost functionality to meet a specific, complex requirement such as profiling performance metrics, and to implement highly customized compliance rules for information barriers.

If you have any feedback on the plugin framework, let us know by replying to this forum post! All feedback is welcome.

For more information on plugins, see our admin documentation and developer documentation.

6 Likes

Not quite clear. :frowning:
The possibilities that can be realized through plugins will depend on the editorial board of the mattermost?

or talking about something that her version now just does not support plugins?

Thanks @danilvoe for your interest!

The stewardship principles that guide the development of the open source project (Team Edition) will also guide the development of the plugin framework.

As an example, a pre-packaged plugin for highly customized compliance rules would complicate admiministration and limit user freedom whereas the open source project is intended to have near zero administration without hard limits.

@jasonblais

The question was that the plug-ins (provided that the developer of the plug-in was not initially limited to writing) would be technically limited as far as possible, depending on the version.

Thanks @danilvoe, good question.

There are some limitations what the plugin developer can do. For instance, not all the UI components can be overwritten quite yet and the developer might need plugin APIs or hooks that arenā€™t available yet. The plan is to add support and extend the ability of plugins over time based on customer and community feedback.

This is similar to webhook integrations where we add support for additional features over time (personal access tokens, message buttons, etc).

Let me know if that helps?

1 Like

I am trying to add zoom plugin in Mattermost 4.5 version.But its not working.
I have done below steps:
I have created Zoom developer account and use API key and secret in system console Plugins zoom.
I have use webhook url to zoom webhook settings in API credentials.
Then activate the zoom plugin.
After that zoom plugin is not display in default channel.

I have solved the issue. Web socket was not connecting but when SSL add the issue resolved.

Thanks

Hi
Iā€™m getting the error:

[2018/01/03 10:04:18 GMT] [EROR] failed to start up plugins: mkdir ./client/plugins: no such file or directory

Iā€™ve checked my perms. They all seem healthy. The plugin dir even seems to existā€¦

# pwd
/opt/mattermost
# ls -l client | grep plugins
drwxr--r--. 2 mattermost mattermost        6 Nov 27 08:30 plugins

other things seem to be working ok (file attachments, custom emoji, etc)

@rheouk What triggers this error message for you?

I get this at startup, or when trying to enable plugins. In context with the nearby messages:

[2018/01/03 13:40:29 GMT] [INFO] Starting up plugins
[2018/01/03 13:40:29 GMT] [EROR] failed to start up plugins: mkdir ./client/plugins: no such file or directory
[2018/01/03 13:40:29 GMT] [INFO] Starting up plugins
[2018/01/03 13:40:29 GMT] [EROR] failed to start up plugins: mkdir ./client/plugins: no such file or directory
[2018/01/03 13:40:33 GMT] [EROR] /api/v4/plugins/webapp:GetActivePluginManifests code=501 rid=asdf uid=zxcv ip=1.2.3.4 Plugins have been disabled. [details: ]

Just to confirm, I am using 4.5.0ā€¦

@rheouk is there a client directory inside your mattermost folder? Also can you share the service configuration youā€™re using?

For example on Ubuntu 14.04 it might be:

start on runlevel [2345]
stop on runlevel [016]
respawn
limit nofile 50000 50000
chdir /opt/mattermost
setuid mattermost
exec bin/platform

@jwilander here you go:

additionally:

[root@matterhost ~]# systemctl status mattermost
ā— mattermost.service - Mattermost
   Loaded: loaded (/usr/lib/systemd/system/mattermost.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2018-01-03 09:49:37 GMT; 5h 24min ago
 Main PID: 14880 (platform)
   CGroup: /system.slice/mattermost.service
           ā””ā”€14880 /opt/mattermost/bin/platform

Jan 03 15:04:29 matterhost.example.com platform[14880]: [2018/01/03 15:04:29 GMT] [EROR] /api/v4/plugins/webapp:GetActivePlugi...ls: ]
[root@matterhost ~]# ls -l /opt/mattermost
total 196
drwxr-xr-x. 3 mattermost mattermost     35 Dec 15 23:18 bin
drwxr-xr-x. 7 mattermost mattermost  16384 Dec 15 23:17 client
drwxr-xr-x. 2 mattermost mattermost   4096 Jan  3 09:49 config
-rw-r--r--. 1 mattermost mattermost   2044 Dec 15 23:17 ENTERPRISE-EDITION-LICENSE.txt
drwxr-xr-x. 2 mattermost mattermost     24 Dec 15 23:17 fonts
drwxr-xr-x. 2 mattermost mattermost   4096 Dec 15 23:17 i18n
drwxr-xr-x. 2 mattermost mattermost   4096 Dec 15 23:17 logs
-rw-r--r--. 1 mattermost mattermost 147575 Dec 15 23:17 NOTICE.txt
-rw-r--r--. 1 mattermost mattermost   5181 Dec 15 23:17 README.md
drwxr-xr-x. 2 mattermost mattermost   4096 Dec 15 23:17 templates
drwxr-xr-x. 3 mattermost mattermost     17 Sep 13 23:32 webapp

Can you try updating your WorkingDirectory to WorkingDirectory=/opt/mattermost? My bet is that itā€™s looking in /opt/mattermost/bin/client/plugins/ instead of /opt/mattermost/client/plugins/

1 Like

great spot - that sorted it! (and I even spotted a similar fix in the docker build - didnā€™t spot it in my own unit fileā€¦ :man_facepalming:)

You called the /bin, too:

[root@matterhost bin]# ls -l
total 48568
-rwxr-xr-x. 1 mattermost mattermost 49731993 Dec 15 23:18 platform
drwxr--r--. 2 mattermost mattermost        6 Nov 27 08:30 plugins
[root@matterhost bin]# pwd
/opt/mattermost/bin

Thanks again @jwilander and @jasonblais
:+1:

Awesome, glad we figured it out. I think weā€™re also going to make some updates to make this less likely to be an issue in the future and we also have some ideas about better error handling/reporting that should make figuring out issues easier.

Hi!
Iā€™ve been playing a bit with the plugins system (mainly to add slash commands without having to install anything else outside Mattermost), and I have a few feedbacks points to make :slight_smile:

  1. It wasnā€™t obvious in the documentation how to get the TeamId (which is required to register slash command). Looking at the PR that introduced the slash command support in plugins, I found that I simply needed to add TeamId to the Plugin struct. How does that work ? Are there other ā€˜magicā€™ attributes that work the same way (maybe Enabled which I saw in the JIRA plugin example)?

  2. When thereā€™s an error while activating a plugin from the Management page, the plugin appears activated even though itā€™s not (you have to go to the logs to see the error, or refresh the page to see the deactivated status).

  3. When the plugin configuration is modified via its dedicated page, the plugin is deactivated and needs to be activated manually again. I find that really weird so maybe itā€™s an error on my part?

  4. When defining my slash commands, I set the AutoCompleteHint property but no hint appears when the command is displayed in the autocompletion list.

  5. Is it wanted that configuration pages of deactivated plugins are visible in the menu?

The plugin framework is a cool tool and itā€™s going to be a joy to use it to make Mattermost even more useful, thank you for your work :slight_smile:

1 Like

Always happy to get feedback on plugins!

  1. There are no plugin fields with any special meaning. If youā€™re looking at the TeamId field of the test plugin here, note that itā€™s populated by the test here. Your plugin is probably working now because the team id isnā€™t actually required (and should still work if you removed the field). For example, see the code for our /memes plugin. The only thing thatā€™s required to register a command is the trigger.

  2. That page needs a lot of work. :-/

  3. Thatā€™s definitely not intended behavior. The plugin shouldnā€™t be deactivated at all, and the OnConfigurationChange hook should fire. If you have any relevant log messages or other details, Iā€™ll be glad to investigate this if needed. (I did just try this locally though and things seemed to work fine for me.)

  4. I assume youā€™re also setting AutoComplete to true? Went ahead and tested this. Itā€™s a bug and hereā€™s the fix.

  5. I think so. For some plugins it makes sense to configure them before activating them for the first time.

I can investigate 3 and 4 if it looks like somethingā€™s not working right. And if you think of any cool plugins that you want to build, but find we havenā€™t implemented all of the plugin APIs you would need, let us know. Weā€™re pretty receptive to feature requests for plugins right now. :slight_smile:

You can also join us in our dev toolkit channel if you have more questions or feedback: https://pre-release.mattermost.com/core/channels/developer-toolkit

1 Like

Thank you for all these informations, and the memes plugin that had escaped my searches and provides lots of examples (also, fun to use) :slight_smile:
Regarding #3, I havent reproduced it recently so it must have been a bug in my code (or my brain).

There is a feeling that the support for plugins has stalled, what with the development of https://github.com/mattermost/mattermost-developer-kit?