mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
Changing from the existing method of adding built in labels at server startup. This new method should be friendlier to long term changes, and falls in line with the new pattern established for osquery options. Fixes #702
39 lines
1 KiB
Go
39 lines
1 KiB
Go
package appstate
|
|
|
|
import "github.com/kolide/kolide-ose/server/kolide"
|
|
|
|
// Labels is the set of builtin labels that should be populated in the
|
|
// datastore
|
|
func Labels() []kolide.Label {
|
|
return []kolide.Label{
|
|
{
|
|
Name: "All Hosts",
|
|
Query: "select 1;",
|
|
LabelType: kolide.LabelTypeBuiltIn,
|
|
},
|
|
{
|
|
Platform: "darwin",
|
|
Name: "Mac OS X",
|
|
Query: "select 1 from osquery_info where build_platform = 'darwin';",
|
|
LabelType: kolide.LabelTypeBuiltIn,
|
|
},
|
|
{
|
|
Platform: "ubuntu",
|
|
Name: "Ubuntu Linux",
|
|
Query: "select 1 from osquery_info where build_platform = 'ubuntu';",
|
|
LabelType: kolide.LabelTypeBuiltIn,
|
|
},
|
|
{
|
|
Platform: "centos",
|
|
Name: "CentOS Linux",
|
|
Query: "select 1 from osquery_info where build_platform = 'centos';",
|
|
LabelType: kolide.LabelTypeBuiltIn,
|
|
},
|
|
{
|
|
Platform: "windows",
|
|
Name: "MS Windows",
|
|
Query: "select 1 from osquery_info where build_platform = 'windows';",
|
|
LabelType: kolide.LabelTypeBuiltIn,
|
|
},
|
|
}
|
|
}
|