...
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).
...
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. Ask Integrations if we have this or not After brief discussion with the integrations team, it was mentioned that plugins currently can render a custom React component for a plugin’s settings but that is as much modifying they can do in the system console. There is currently no structured way to do any more modifying and would require
creative thinking
as mentioned by integrations.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 It was 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. Phrase it in a more positive way, mention how you can take it and make more improvePersonally, 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. This is not valid as someone else could be writing it
GOALS
...
Make it easier for support to gather the information they need by providing an downloadable zip file that provides
...
API endpoint that responds with text file expand more
Ask support about the format they want since they do a lot of scripting. Text or Json? Verify with them
// Could have an api endpoint with json payload.
SCOPE
Mention phase 2 is out of scope
In:
Out:
High-level Architecture
Developers Perspective
Describe how it works, hit 1? hit 2? existing endpoint or not?
...
Anyone who has access to system console (any admin role) should be allowed to do this.
Schema
...
we like to improve upon this even further by adding a modal for licensed customers (customers with E10 and E20 licenses) which allows them to download the support packet.
GOALS
Make it easier for support to gather the information they need by providing an downloadable zip file that includes 5 files which will allow support to trouble shoot users problems easier.
SCOPE
Out:
All the requirements seen in phase 2 (EE: Support Packet Generation ) will be out of scope.
High-level Architecture
A GET request will be made to an endpoint which then returns a zip file with one support_packet.yaml
file outlining information regarding their server, a plugins.json
file which will outline all the plugins they have installed on their server, a mattermost.log
and notifications.log
which has all the server activity in it, and finally a sanitized_config.json
which has their active sanitized config settings.
Permissions
Anyone who has access to system console (any admin role) should be allowed to do this.
Schema
No database changes required
REST API
GET /api4/system/generate_support_packet
Explain response , what files it will include, the format of the files, give an example of what the response is going to looks like. Make sure zip file name is unique and how to name it.
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) (JSON In text?? make this a separate file?? plugins.json):
We can do a
Code Block |
---|
response, err := c.App.GetPlugins()
if err != nil {
c.Err = err
return
} |
which when we convert to JSON
will return something like this
...
language | json |
---|
...
Once the above API endpoint is hit, a ZIP file namedmattermost_support_packet_YYYY-MM-DD-HH-MM.zip
Within this ZIP file will include 5 files.
support_packet.yaml
Code Block | ||
---|---|---|
| ||
server_os: {os}
database_type: {type}
database_version: {version}
ldap_vendor_name: {name}
ldap_vendor_version: {version}
elastic_server_version: {elastic_version}
elastic_server_plugins: {plugins} |
The possible GO struct to marshal to the above format may look something like this
Code Block | ||
---|---|---|
| ||
type SupportPacket struct {
ServerOS string `yaml:"server_os"`
DatabaseType string `yaml:"database_type"`
DatabaseVersion string `yaml:"database_version"`
LdapVendorName string `yaml:"ldap_vendor_name,omitempty"`
LdapVendorVersion string `yaml:"ldap_vendor_version,omitempty"`
ElasticServerVersion string `yaml:"elastic_server_version,omitempty"`
ElasticServerPlugins string[] `yaml:"elastic_server_plugins,omitempty"`
} |
plugins.json
Code Block | ||
---|---|---|
| ||
{
"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
}
]
}
}]
} |
mattermost.log
notifications.log
sanitized_config.json
(A possible example of what it may look like)
Code Block | ||
---|---|---|
| ||
{
"ServiceSettings": {
"SiteURL": "http://localhost:8065",
"WebsocketURL": null,
"LicenseFileLocation": null,
"ListenAddress": ":8065",
"ConnectionSecurity": "",
"TLSCertFile": "",
"TLSKeyFile": "",
"TLSMinVer": null,
"TLSStrictTransport": null,
"TLSStrictTransportMaxAge": null,
"TLSOverwriteCiphers": null,
"UseLetsEncrypt": false,
"LetsEncryptCertificateCacheFile": "./config/letsencrypt.cache",
"Forward80To443": false,
"TrustedProxyIPHeader": null,
"ReadTimeout": 300,
"WriteTimeout": 300,
"IdleTimeout": null,
"MaximumLoginAttempts": 10,
"GoroutineHealthThreshold": null,
"GoogleDeveloperKey": "",
"EnableOAuthServiceProvider": false,
"EnableIncomingWebhooks": true,
"EnableOutgoingWebhooks": true,
"EnableCommands": true,
"EnableOnlyAdminIntegrations": null,
"EnablePostUsernameOverride": false,
"EnablePostIconOverride": false,
"EnableLinkPreviews": false,
"EnableTesting": false,
"EnableDeveloper": true,
"EnableOpenTracing": null,
"EnableSecurityFixAlert": true,
"EnableInsecureOutgoingConnections": false,
"AllowedUntrustedInternalConnections": "localhost,",
"EnableMultifactorAuthentication": false,
"EnforceMultifactorAuthentication": false,
"EnableUserAccessTokens": false,
"AllowCorsFrom": "",
"CorsExposedHeaders": "",
"CorsAllowCredentials": false,
"CorsDebug": false,
"AllowCookiesForSubdomains": null,
"ExtendSessionLengthWithActivity": true,
"SessionLengthWebInDays": 30,
"SessionLengthMobileInDays": 30,
"SessionLengthSSOInDays": 30,
"SessionCacheInMinutes": 10,
"SessionIdleTimeoutInMinutes": 43200,
"WebsocketSecurePort": null,
"WebsocketPort": null,
"WebserverMode": "gzip",
"EnableCustomEmoji": false,
"EnableEmojiPicker": true,
"EnableGifPicker": false,
"GfycatApiKey": "2_KtH_W5",
"GfycatApiSecret": "********************************",
"RestrictCustomEmojiCreation": null,
"RestrictPostDelete": null,
"AllowEditPost": null,
"PostEditTimeLimit": -1,
"TimeBetweenUserTypingUpdatesMilliseconds": null,
"EnablePostSearch": null,
"MinimumHashtagLength": 3,
"EnableUserTypingMessages": null,
"EnableChannelViewedMessages": null,
"EnableUserStatuses": null,
"ExperimentalEnableAuthenticationTransfer": null,
"ClusterLogTimeoutMilliseconds": null,
"CloseUnusedDirectMessages": null,
"EnablePreviewFeatures": null,
"EnableTutorial": null,
"ExperimentalEnableDefaultChannelLeaveJoinMessages": null,
"ExperimentalGroupUnreadChannels": null,
"ExperimentalChannelOrganization": null,
"ExperimentalChannelSidebarOrganization": null,
"ImageProxyType": null,
"ImageProxyURL": null,
"ImageProxyOptions": null,
"EnableAPITeamDeletion": null,
"EnableAPIUserDeletion": null,
"ExperimentalEnableHardenedMode": null,
"DisableLegacyMFA": null,
"ExperimentalStrictCSRFEnforcement": null,
"EnableEmailInvitations": true,
"DisableBotsWhenOwnerIsDeactivated": true,
"EnableBotAccountCreation": true,
"EnableSVGs": true,
"EnableLatex": false,
"EnableAPIChannelDeletion": null,
"EnableLocalMode": null,
"LocalModeSocketLocation": null,
"EnableAWSMetering": null,
"SplitKey": "********************************",
"FeatureFlagSyncIntervalSeconds": 30,
"DebugSplit": false,
"ThreadAutoFollow": null,
"CollapsedThreads": null,
"ManagedResourcePaths": ""
},
"TeamSettings": {
"SiteName": "Mattermost",
"MaxUsersPerTeam": 100,
"EnableTeamCreation": null,
"EnableUserCreation": true,
"EnableOpenServer": true,
"EnableUserDeactivation": null,
"RestrictCreationToDomains": "",
"EnableCustomBrand": false,
"CustomBrandText": "",
"CustomDescriptionText": "",
"RestrictDirectMessage": "any",
"RestrictTeamInvite": null,
"RestrictPublicChannelManagement": null,
"RestrictPrivateChannelManagement": null,
"RestrictPublicChannelCreation": null,
"RestrictPrivateChannelCreation": null,
"RestrictPublicChannelDeletion": null,
"RestrictPrivateChannelDeletion": null,
"RestrictPrivateChannelManageMembers": null,
"EnableXToLeaveChannelsFromLHS": null,
"UserStatusAwayTimeout": null,
"MaxChannelsPerTeam": 2000,
"MaxNotificationsPerChannel": 1000000,
"EnableConfirmNotificationsToChannel": true,
"TeammateNameDisplay": "username",
"ExperimentalViewArchivedChannels": false,
"ExperimentalEnableAutomaticReplies": null,
"ExperimentalHideTownSquareinLHS": null,
"ExperimentalTownSquareIsReadOnly": null,
"LockTeammateNameDisplay": false,
"ExperimentalPrimaryTeam": null,
"ExperimentalDefaultChannels": null
},
"ClientRequirements": {
"AndroidLatestVersion": "",
"AndroidMinVersion": "",
"DesktopLatestVersion": "",
"DesktopMinVersion": "",
"IosLatestVersion": "",
"IosMinVersion": ""
},
"SqlSettings": {
"DriverName": "postgres",
"DataSource": "********************************",
"DataSourceReplicas": [],
"DataSourceSearchReplicas": [],
"MaxIdleConns": 20,
"ConnMaxLifetimeMilliseconds": 3600000,
"MaxOpenConns": 300,
"Trace": false,
"AtRestEncryptKey": "********************************",
"QueryTimeout": 30,
"DisableDatabaseSearch": false
},
"LogSettings": {
"EnableConsole": true,
"ConsoleLevel": "INFO",
"ConsoleJson": true,
"EnableFile": true,
"FileLevel": "INFO",
"FileJson": true,
"FileLocation": "",
"EnableWebhookDebugging": true,
"EnableDiagnostics": true,
"EnableSentry": false,
"AdvancedLoggingConfig": ""
},
"ExperimentalAuditSettings": {
"FileEnabled": null,
"FileName": null,
"FileMaxSizeMB": null,
"FileMaxAgeDays": null,
"FileMaxBackups": null,
"FileCompress": null,
"FileMaxQueueSize": null,
"AdvancedLoggingConfig": null
},
"NotificationLogSettings": {
"EnableConsole": null,
"ConsoleLevel": null,
"ConsoleJson": null,
"EnableFile": null,
"FileLevel": null,
"FileJson": null,
"FileLocation": null,
"AdvancedLoggingConfig": null
},
"PasswordSettings": {
"MinimumLength": 5,
"Lowercase": false,
"Number": false,
"Uppercase": false,
"Symbol": false
},
"FileSettings": {
"EnableFileAttachments": true,
"EnableMobileUpload": true,
"EnableMobileDownload": true,
"MaxFileSize": 52428800,
"DriverName": "local",
"Directory": "./data/",
"EnablePublicLink": false,
"PublicLinkSalt": "********************************",
"InitialFont": "nunito-bold.ttf",
"AmazonS3AccessKeyId": "",
"AmazonS3SecretAccessKey": "",
"AmazonS3Bucket": "",
"AmazonS3PathPrefix": "",
"AmazonS3Region": "",
"AmazonS3Endpoint": "s3.amazonaws.com",
"AmazonS3SSL": true,
"AmazonS3SignV2": false,
"AmazonS3SSE": false,
"AmazonS3Trace": false
},
"EmailSettings": {
"EnableSignUpWithEmail": true,
"EnableSignInWithEmail": true,
"EnableSignInWithUsername": true,
"SendEmailNotifications": true,
"UseChannelInEmailNotifications": null,
"RequireEmailVerification": false,
"FeedbackName": "",
"FeedbackEmail": "test@example.com",
"ReplyToAddress": "test@example.com",
"FeedbackOrganization": "",
"EnableSMTPAuth": true,
"SMTPUsername": "",
"SMTPPassword": "********************************",
"SMTPServer": "localhost",
"SMTPPort": "10025",
"SMTPServerTimeout": null,
"ConnectionSecurity": "",
"SendPushNotifications": true,
"PushNotificationServer": "https://push-test.mattermost.com",
"PushNotificationContents": "generic",
"PushNotificationBuffer": null,
"EnableEmailBatching": false,
"EmailBatchingBufferSize": null,
"EmailBatchingInterval": null,
"EnablePreviewModeBanner": true,
"SkipServerCertificateVerification": false,
"EmailNotificationContentsType": "full",
"LoginButtonColor": null,
"LoginButtonBorderColor": null,
"LoginButtonTextColor": null
},
"RateLimitSettings": {
"Enable": false,
"PerSec": 10,
"MaxBurst": 100,
"MemoryStoreSize": 10000,
"VaryByRemoteAddr": true,
"VaryByUser": false,
"VaryByHeader": ""
},
"PrivacySettings": {
"ShowEmailAddress": true,
"ShowFullName": true
},
"SupportSettings": {
"TermsOfServiceLink": "https://about.mattermost.com/default-terms/",
"PrivacyPolicyLink": "https://about.mattermost.com/default-privacy-policy/",
"AboutLink": "https://about.mattermost.com/default-about/",
"HelpLink": "https://about.mattermost.com/default-help/",
"ReportAProblemLink": "https://about.mattermost.com/default-report-a-problem/",
"SupportEmail": "feedback@mattermost.com",
"CustomTermsOfServiceEnabled": null,
"CustomTermsOfServiceReAcceptancePeriod": null,
"EnableAskCommunityLink": true
},
"AnnouncementSettings": {
"EnableBanner": false,
"BannerText": "",
"BannerColor": "#f2a93b",
"BannerTextColor": "#333333",
"AllowBannerDismissal": true,
"AdminNoticesEnabled": false,
"UserNoticesEnabled": false,
"NoticesURL": "https://notices.mattermost.com/",
"NoticesFetchFrequency": 3600,
"NoticesSkipCache": false
},
"ThemeSettings": {
"EnableThemeSelection": null,
"DefaultTheme": null,
"AllowCustomThemes": null,
"AllowedThemes": null
},
"GitLabSettings": {
"Enable": false,
"Secret": "",
"Id": "",
"Scope": "",
"AuthEndpoint": "",
"TokenEndpoint": "",
"UserApiEndpoint": "",
"DiscoveryEndpoint": "",
"ButtonText": "",
"ButtonColor": ""
},
"GoogleSettings": {
"Enable": false,
"Secret": "",
"Id": "",
"Scope": "profile email",
"AuthEndpoint": "https://accounts.google.com/o/oauth2/v2/auth",
"TokenEndpoint": "https://www.googleapis.com/oauth2/v4/token",
"UserApiEndpoint": "https://people.googleapis.com/v1/people/me?personFields=names,emailAddresses,nicknames,metadata",
"DiscoveryEndpoint": "https://accounts.google.com/.well-known/openid-configuration",
"ButtonText": "",
"ButtonColor": ""
},
"Office365Settings": {
"Enable": false,
"Secret": "",
"Id": "",
"Scope": "User.Read",
"AuthEndpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
"TokenEndpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/token",
"UserApiEndpoint": "https://graph.microsoft.com/v1.0/me",
"DiscoveryEndpoint": "https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration",
"DirectoryId": ""
},
"OpenIdSettings": {
"Enable": false,
"Secret": "",
"Id": "",
"Scope": "profile openid email",
"AuthEndpoint": "",
"TokenEndpoint": "",
"UserApiEndpoint": "",
"DiscoveryEndpoint": "",
"ButtonText": "",
"ButtonColor": "#145DBF"
},
"LdapSettings": {
"Enable": true,
"EnableSync": false,
"LdapServer": "localhost",
"LdapPort": 389,
"ConnectionSecurity": "",
"BaseDN": "dc=mm,dc=test,dc=com",
"BindUsername": "cn=admin,dc=mm,dc=test,dc=com",
"BindPassword": "********************************",
"UserFilter": "",
"GroupFilter": "",
"GuestFilter": "",
"EnableAdminFilter": null,
"AdminFilter": null,
"GroupDisplayNameAttribute": "cn",
"GroupIdAttribute": "entryUUID",
"FirstNameAttribute": "cn",
"LastNameAttribute": "sn",
"EmailAttribute": "mail",
"UsernameAttribute": "uid",
"NicknameAttribute": "cn",
"IdAttribute": "uid",
"PositionAttribute": "sAMAccountType",
"LoginIdAttribute": "uid",
"PictureAttribute": "",
"SyncIntervalMinutes": 10000,
"SkipCertificateVerification": false,
"PublicCertificateFile": "",
"PrivateKeyFile": "",
"QueryTimeout": 60,
"MaxPageSize": 500,
"LoginFieldName": "",
"LoginButtonColor": "#0000",
"LoginButtonBorderColor": "#2389D7",
"LoginButtonTextColor": "#2389D7",
"Trace": false
},
"ComplianceSettings": {
"Enable": null,
"Directory": null,
"EnableDaily": null
},
"LocalizationSettings": {
"DefaultServerLocale": "en",
"DefaultClientLocale": "en",
"AvailableLocales": ""
},
"SamlSettings": {
"Enable": false,
"EnableSyncWithLdap": false,
"EnableSyncWithLdapIncludeAuth": false,
"IgnoreGuestsLdapSync": false,
"Verify": true,
"Encrypt": true,
"SignRequest": false,
"IdpUrl": "",
"IdpDescriptorUrl": "",
"IdpMetadataUrl": "",
"ServiceProviderIdentifier": "http://localhost:8065/login/sso/saml",
"AssertionConsumerServiceURL": "",
"SignatureAlgorithm": "RSAwithSHA1",
"CanonicalAlgorithm": "Canonical1.0",
"ScopingIDPProviderId": "",
"ScopingIDPName": "",
"IdpCertificateFile": "saml-idp.crt",
"PublicCertificateFile": "saml-public.crt",
"PrivateKeyFile": "saml-private.key",
"IdAttribute": "",
"GuestAttribute": "",
"EnableAdminAttribute": null,
"AdminAttribute": null,
"FirstNameAttribute": "",
"LastNameAttribute": "",
"EmailAttribute": "Email",
"UsernameAttribute": "Username",
"NicknameAttribute": "",
"LocaleAttribute": "",
"PositionAttribute": "",
"LoginButtonText": "SAML",
"LoginButtonColor": "#34a28b",
"LoginButtonBorderColor": "#2389D7",
"LoginButtonTextColor": "#ffffff"
},
"NativeAppSettings": {
"AppDownloadLink": "https://mattermost.com/download/#mattermostApps",
"AndroidAppDownloadLink": "https://about.mattermost.com/mattermost-android-app/",
"IosAppDownloadLink": "https://about.mattermost.com/mattermost-ios-app/"
},
"ClusterSettings": {
"Enable": false,
"ClusterName": "",
"OverrideHostname": "",
"NetworkInterface": "",
"BindAddress": "",
"AdvertiseAddress": "",
"UseIpAddress": true,
"UseExperimentalGossip": false,
"EnableExperimentalGossipEncryption": false,
"ReadOnlyConfig": false,
"GossipPort": 8074,
"StreamingPort": 8075,
"MaxIdleConns": 100,
"MaxIdleConnsPerHost": 128,
"IdleConnTimeoutMilliseconds": 90000
},
"MetricsSettings": {
"Enable": false,
"BlockProfileRate": 0,
"ListenAddress": ":8067"
},
"ExperimentalSettings": {
"ClientSideCertEnable": null,
"ClientSideCertCheck": null,
"EnableClickToReply": null,
"LinkMetadataTimeoutMilliseconds": null,
"RestrictSystemAdmin": null,
"UseNewSAMLLibrary": null,
"CloudUserLimit": null,
"CloudBilling": null,
"EnableSharedChannels": null
},
"AnalyticsSettings": {
"MaxUsersForStatistics": null
},
"ElasticsearchSettings": {
"ConnectionUrl": "http://localhost:9200",
"Username": "elastic",
"Password": "********************************",
"EnableIndexing": true,
"EnableSearching": false,
"EnableAutocomplete": false,
"Sniff": false,
"PostIndexReplicas": 1,
"PostIndexShards": 1,
"ChannelIndexReplicas": 1,
"ChannelIndexShards": 1,
"UserIndexReplicas": 1,
"UserIndexShards": 1,
"AggregatePostsAfterDays": 365,
"PostsAggregatorJobStartTime": "03:00",
"IndexPrefix": "",
"LiveIndexingBatchSize": 1,
"BulkIndexingTimeWindowSeconds": 3600,
"RequestTimeoutSeconds": 30,
"SkipTLSVerification": false,
"Trace": ""
},
"BleveSettings": {
"IndexDir": null,
"EnableIndexing": null,
"EnableSearching": null,
"EnableAutocomplete": null,
"BulkIndexingTimeWindowSeconds": null
},
"DataRetentionSettings": {
"EnableMessageDeletion": null,
"EnableFileDeletion": null,
"MessageRetentionDays": null,
"FileRetentionDays": null,
"DeletionJobStartTime": null
},
"MessageExportSettings": {
"EnableExport": null,
"ExportFormat": null,
"DailyRunTime": null,
"ExportFromTimestamp": null,
"BatchSize": null,
"DownloadExportResults": null,
"GlobalRelaySettings": null
},
"JobSettings": {
"RunJobs": null,
"RunScheduler": null
},
"PluginSettings": {
"Enable": true,
"EnableUploads": true,
"AllowInsecureDownloadUrl": false,
"EnableHealthCheck": true,
"Directory": "./plugins",
"ClientDirectory": "./client/plugins",
"Plugins": {},
"PluginStates": {
"antivirus": {
"Enable": false
},
"com.mattermost.aws-sns": {
"Enable": false
},
"com.mattermost.nps": {
"Enable": false
},
"com.mattermost.plugin-channel-export": {
"Enable": true
},
"com.mattermost.plugin-incident-management": {
"Enable": false
},
"com.mattermost.plugin-incident-response": {
"Enable": false
},
"mattermost-autolink": {
"Enable": false
}
},
"EnableMarketplace": true,
"EnableRemoteMarketplace": true,
"AutomaticPrepackagedPlugins": true,
"RequirePluginSignature": false,
"MarketplaceUrl": "https://api.integrations.mattermost.com",
"SignaturePublicKeyFiles": []
},
"DisplaySettings": {
"CustomUrlSchemes": [],
"ExperimentalTimezone": null
},
"GuestAccountsSettings": {
"Enable": true,
"AllowEmailAccounts": true,
"EnforceMultifactorAuthentication": false,
"RestrictCreationToDomains": ""
},
"ImageProxySettings": {
"Enable": true,
"ImageProxyType": "local",
"RemoteImageProxyURL": "",
"RemoteImageProxyOptions": ""
},
"CloudSettings": {
"CWSUrl": "https://customers.mattermost.com"
},
"ImportSettings": {
"Directory": null,
"RetentionDays": null
}
} |
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
Possibly looking to use GetByName
in System SQL store.
List plugins installed (including versions) (Included as a separate file called plugins.json):
We can do a
Code Block |
---|
response, err := c.App.GetPlugins() if err != nil { "default":10 c.Err = }err ] return } } ] }} |
which we can then marshal into a JSON file as shown above.
LDAP Vendor & LDAP Version:
Due to the limited support for retrieving these and complexities that arise when dealing with different vendors and their specific implementation, the best we can do is query for vendorName
and vendorVersion
and provide those if anything return.
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 (mattermost.log + notifications.log):
Describe this is an The below code snippet is a example of how you retrieve the mattermost.log
file to be attached to the zip.
...
language | go |
---|
...
will be retrieved and then it will be taken and attached to the .zip.
Code Block | ||
---|---|---|
| ||
if *s.Config().LogSettings.EnableFile { // mattermost.log logFile := utils.GetLogFileLocation(*s.Config().LogSettings.EnableFile {FileLocation) // notifications.log logFilenotificationsLogFile := utils.GetLogFileLocationGetNotificationsLogFileLocation(*s.Config().LogSettings.FileLocation)) file, err := os.Open(logFile) // Write that file into the zip the user will download } |
Active Config Setting (Sanitized Config.json or something, but make sure it is a separate file!!, have it in the example!This will be included as a separate file called sanitized_config.json)
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.
Specify that this is This will be a simple modal with translated text and button to download your support packet.
CLI
Zip ZIP file creation not accessible via CLI in any of the current phases.Talk to Kaite / Support team and ask them about it.
Webapp only
Mobile and Webapp
Mobile does not have anything because it this feature is only accessible in through the system console
Performance
No performance impact expected as this is simple/request response that is retrieving information.
...