mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 00:45:19 +00:00
207 lines
4.5 KiB
Cheetah
207 lines
4.5 KiB
Cheetah
{{ define "enroll" -}}
|
|
{
|
|
"enroll_secret": "{{ .EnrollSecret }}",
|
|
"host_details": {
|
|
"os_version": {
|
|
"arch": "x86_64",
|
|
"build": "",
|
|
"codename": "jammy",
|
|
"major": "22",
|
|
"minor": "4",
|
|
"name": "Ubuntu",
|
|
"patch": "0",
|
|
"platform": "ubuntu",
|
|
"platform_like": "debian",
|
|
"version": "22.04.1 LTS (Jammy Jellyfish)"
|
|
},
|
|
"osquery_info": {
|
|
"build_distro": "centos7",
|
|
"build_platform": "linux",
|
|
"config_hash": "",
|
|
"config_valid": "0",
|
|
"extensions": "inactive",
|
|
"instance_id": "{{ .UUID }}",
|
|
"pid": "12947",
|
|
"platform_mask": "21",
|
|
"start_time": "1580931224",
|
|
"uuid": "{{ .UUID }}",
|
|
"version": "5.5.1",
|
|
"watcher": "-1"
|
|
},
|
|
"platform_info": {
|
|
},
|
|
"system_info": {
|
|
"computer_name": "{{ .CachedString "hostname" }}",
|
|
"cpu_brand": "Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz",
|
|
"cpu_logical_cores": "8",
|
|
"cpu_physical_cores": "4",
|
|
"cpu_subtype": "Intel x86-64h Haswell",
|
|
"cpu_type": "x86_64h",
|
|
"hardware_model": "",
|
|
"hardware_serial": "{{ .SerialNumber }}",
|
|
"hardware_vendor": "",
|
|
"hardware_version": "",
|
|
"hostname": "{{ .CachedString "hostname" }}",
|
|
"local_hostname": "{{ .CachedString "hostname" }}",
|
|
"physical_memory": "17179869184",
|
|
"uuid": "{{ .UUID }}"
|
|
}
|
|
},
|
|
"host_identifier": "{{ .UUID }}",
|
|
"platform_type": "16"
|
|
}
|
|
{{- end }}
|
|
|
|
{{ define "fleet_detail_query_network_interface_unix" -}}
|
|
[
|
|
{
|
|
"address":"fe80::8cb:112d:ff51:1e5d%en0",
|
|
"mac":"f8:2d:88:93:56:5c"
|
|
}
|
|
]
|
|
{{- end }}
|
|
{{ define "fleet_detail_query_os_version" -}}
|
|
[
|
|
{
|
|
"arch": "x86_64",
|
|
"build": "",
|
|
"codename": "jammy",
|
|
"major": "22",
|
|
"minor": "4",
|
|
"name": "Ubuntu",
|
|
"patch": "0",
|
|
"platform": "ubuntu",
|
|
"platform_like": "debian",
|
|
"version": "22.04.1 LTS (Jammy Jellyfish)"
|
|
}
|
|
]
|
|
{{- end }}
|
|
{{ define "fleet_detail_query_os_unix_like" -}}
|
|
[
|
|
{
|
|
"name":"Ubuntu",
|
|
"version":"22.04.1 LTS (Jammy Jellyfish)",
|
|
"major":"22",
|
|
"minor":"4",
|
|
"patch":"0",
|
|
"build":"",
|
|
"platform":"ubuntu",
|
|
"arch":"x86_64",
|
|
"kernel_version":"5.10.76-linuxkit"
|
|
}
|
|
]
|
|
{{- end }}
|
|
{{ define "fleet_detail_query_osquery_flags" -}}
|
|
[
|
|
{
|
|
"name":"config_refresh",
|
|
"value":"{{ printf "%.0f" .ConfigInterval.Seconds }}"
|
|
},
|
|
{
|
|
"name":"distributed_interval",
|
|
"value":"{{ printf "%.0f" .QueryInterval.Seconds }}"
|
|
},
|
|
{
|
|
"name":"logger_tls_period",
|
|
"value":"99999"
|
|
}
|
|
]
|
|
{{- end }}
|
|
{{ define "fleet_detail_query_osquery_info" -}}
|
|
[
|
|
{
|
|
"pid":"11287",
|
|
"uuid":"{{ .UUID }}",
|
|
"instance_id":"{{ .UUID }}",
|
|
"version":"5.5.1",
|
|
"config_hash":"b01efbf375ac6767f259ae98751154fef727ce35",
|
|
"config_valid":"1",
|
|
"extensions":"inactive",
|
|
"build_platform":"linux",
|
|
"build_distro":"centos7",
|
|
"start_time":"1582857555",
|
|
"watcher":"-1",
|
|
"platform_mask":"9"
|
|
}
|
|
]
|
|
{{- end }}
|
|
{{ define "fleet_detail_query_system_info" -}}
|
|
[
|
|
{
|
|
"hostname":"{{ .CachedString "hostname" }}",
|
|
"uuid":"{{ .UUID }}",
|
|
"cpu_type":"x86_64h",
|
|
"cpu_subtype":"Intel x86-64h Haswell",
|
|
"cpu_brand":"Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz",
|
|
"cpu_physical_cores":"4",
|
|
"cpu_logical_cores":"8",
|
|
"cpu_microcode":"",
|
|
"physical_memory":"17179869184",
|
|
"hardware_vendor":"",
|
|
"hardware_model":"",
|
|
"hardware_version":"",
|
|
"hardware_serial":"{{ .SerialNumber }}",
|
|
"computer_name":"{{ .CachedString "hostname" }}",
|
|
"local_hostname":"{{ .CachedString "hostname" }}"
|
|
}
|
|
]
|
|
{{- end }}
|
|
{{ define "fleet_detail_query_uptime" -}}
|
|
[
|
|
{
|
|
"days":"0",
|
|
"hours":"4",
|
|
"minutes":"38",
|
|
"seconds":"11",
|
|
"total_seconds":"16691"
|
|
}
|
|
]
|
|
{{- end }}
|
|
|
|
{{/* all hosts */}}
|
|
{{ define "fleet_label_query_6" -}}
|
|
[
|
|
{
|
|
"1": "1"
|
|
}
|
|
]
|
|
{{- end }}
|
|
|
|
{{/* All macOS hosts */}}
|
|
{{ define "fleet_label_query_7" -}}
|
|
[]
|
|
{{- end }}
|
|
|
|
{{/* All Ubuntu hosts */}}
|
|
{{ define "fleet_label_query_8" -}}
|
|
[
|
|
{
|
|
"1": "1"
|
|
}
|
|
]
|
|
{{- end }}
|
|
|
|
{{/* All CentOS hosts */}}
|
|
{{ define "fleet_label_query_9" -}}
|
|
[]
|
|
{{- end }}
|
|
|
|
{{/* All Windows hosts */}}
|
|
{{ define "fleet_label_query_10" -}}
|
|
[]
|
|
{{- end }}
|
|
|
|
{{/* All Red Hat hosts */}}
|
|
{{ define "fleet_label_query_11" -}}
|
|
[]
|
|
{{- end }}
|
|
|
|
{{/* All Linux distributions */}}
|
|
{{ define "fleet_label_query_12" -}}
|
|
[
|
|
{
|
|
"1": "1"
|
|
}
|
|
]
|
|
{{- end }}
|