Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 8 Next »

OVERVIEW

Support Packet Generation tool will allow users to grab information about their Mattermost instance to provide to the support team to save the trouble for support asking manually for this information. It is in the hopes of increasing productivity and making the process of getting information from a customer faster and easier.

UPDATE DECEMEBER 18 2020: After a meeting with Katie and Michael, it was decided that the code will be directly implemented in the codebase without a plugin. The people who will have access to it is anyone who access to the system console (or any Admin roles).

The reason it was decided that putting it directly in the code base rather than a plugin makes more sense is because

  1. We wanted it somewhere in the system console. I’ve only ever seen plugins implement stuff in chat facing side whether as a slash command or UI component. I believe we don’t have the infrastructure setup such that plugins can inject code into the system console which could add extra work.

  2. We noticed that we already have a commercial support link in the dropdown in the hamburger menu of the system console which leads you the a generic Mattermost support webpage. We decided that it makes most sense to take that and improve on it. This allows us to take something existing within Mattermost which isn’t all that helpful and improve and make it better.

  3. Personally, only having done 1 plugin in the past which was server sided slash command, there will be some time spent learning how the injection of code into the webapp works and this may take time to learn and get familiar with.

GOALS

  1. - Make it easier for support to gather the information they need

SCOPE

In:

Out:

BACKGROUND READING

TERMINOLOGY

SPECIFICATIONS

High-level Architecture

Describe


Permissions

Anyone who has access to system console (any admin role) should be allowed to do this.

Schema

GET /api4/system/generate_support_packet

REST API

Server OS:

In golang, we can use runtime.GOOS to get the operating system which the server is running on.

Although not mentioned in the MVP, we can use runtime.GOARCH to get the architecture of the server. (ex. amd64)

Database Type:

In the store, we have a function available called DriverName() which returns either mysql or postgres. This is what we use elsewhere to determine if our database is either mysql or postgres.

(*SqlChannelStore).DriverName()

Database Version:

In the database, we have a table called Systems which we can query to get the version.

SELECT systems WHERE name == Version

List plugins installed (including versions):

We can do a

     response, err := c.App.GetPlugins()     
     if err != nil {         
      c.Err = err         
      return     
     }

which when we convert to JSON will return something like this

{
   "active":[
      
   ],
   "inactive":[
      {
         "id":"antivirus",
         "name":"Antivirus",
         "description":"Antivirus plugin for scanning uploaded files.",
         "version":"0.1.2",
         "server":{
            "executables":{
               "linux-amd64":"server/dist/plugin-linux-amd64",
               "darwin-amd64":"server/dist/plugin-darwin-amd64",
               "windows-amd64":"server/dist/plugin-windows-amd64.exe"
            },
            "executable":""
         },
         "settings_schema":{
            "header":"Antivirus plugin for scanning uploaded files to Mattermost, uses ClamAV to scan files. See [documentation here](https://github.com/mattermost/mattermost-plugin-antivirus)",
            "footer":"",
            "settings":[
               {
                  "key":"ClamavHostPort",
                  "display_name":"ClamAV - Host and Port",
                  "type":"text",
                  "help_text":"The hostname and port to connect to clamd",
                  "placeholder":"localhost:3310",
                  "default":"localhost:3310"
               },
               {
                  "key":"ScanTimeoutSeconds",
                  "display_name":"Scan Timeout (seconds)",
                  "type":"number",
                  "help_text":"How long the virus scan can take before giving up.",
                  "placeholder":"10",
                  "default":10
               }
            ]
         }
      }
   ]
}

LDAP Vendor:

LDAP Version:

Elastic Search Server Version:

In elasticsearch.go in enterprise, in the Start() function, we are already getting the version and storing it in a variable called version. It would be a matter of storing that in a new field called fullVersion and writing a function which returns that since currently version field is only storing the major version instead of the full version.

Elastic Search Plugins:

The library we are using for Elastic Search (https://github.com/olivere/elastic )

already has this implemented (https://github.com/olivere/elastic/blob/v6.2.35/plugins.go#L24)

Log File:

if *s.Config().LogSettings.EnableFile {
   		logFile := utils.GetLogFileLocation(*s.Config().LogSettings.FileLocation)
		file, err := os.Open(logFile)
		// Write that file into the zip the user will download
}

Active Config Settings:

A matter of calling c.App.GetSanitizedConfig() as it already seems to scrub out all confidential information

Designs can be found at https://www.figma.com/file/ck3EfTynW7nrRlkJGCYKRL/Support-Packet-Request .

Regarding debug level, check to see if their out logs to file is enabled and if the file log levels is set to debug. If not, then let’s show the message in the design to encourage them to enable it and set it to debug and try to recreate their issue to provide us with the most amount of information.

CLI

List CLI additions

Configuration

Webapp only

Mobile and Webapp

Performance

Will there be performance degradation or impact?

Plugins

CREDITS

Thanks to

  • No labels