Enable software inventory for new installations (#2852)

This commit is contained in:
Tomas Touceda 2021-11-09 10:28:14 -03:00 committed by GitHub
parent 8830806b2b
commit cc7a405f93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -0,0 +1 @@
* Enable software inventory by default for new installations

View file

@ -182,15 +182,19 @@ type HostStatusWebhookSettings struct {
func (c *AppConfig) ApplyDefaultsForNewInstalls() {
c.ServerSettings.EnableAnalytics = true
c.SMTPSettings.SMTPPort = 587
c.SMTPSettings.SMTPEnableStartTLS = true
c.SMTPSettings.SMTPAuthenticationType = AuthTypeNameUserNamePassword
c.SMTPSettings.SMTPAuthenticationMethod = AuthMethodNamePlain
c.SMTPSettings.SMTPVerifySSLCerts = true
c.SMTPSettings.SMTPEnableTLS = true
agentOptions := json.RawMessage(`{"config": {"options": {"logger_plugin": "tls", "pack_delimiter": "/", "logger_tls_period": 10, "distributed_plugin": "tls", "disable_distributed": false, "logger_tls_endpoint": "/api/v1/osquery/log", "distributed_interval": 10, "distributed_tls_max_attempts": 3}, "decorators": {"load": ["SELECT uuid AS host_uuid FROM system_info;", "SELECT hostname AS hostname FROM system_info;"]}}, "overrides": {}}`)
c.AgentOptions = &agentOptions
c.HostSettings.EnableSoftwareInventory = true
c.ApplyDefaults()
}