mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 01:18:42 +00:00
Include emergency geolocation query (#8483)
* Include emergency geolocation query https://fleetdm.com/guides/locate-assets-with-osquery * Update standard-query-library.yml Co-authored-by: Guillaume Ross <guillaume@fleetdm.com>
This commit is contained in:
parent
d69bbbb50c
commit
d57b5b9ec8
1 changed files with 19 additions and 1 deletions
|
|
@ -1015,4 +1015,22 @@ spec:
|
|||
tags: compliance, inventory, built-in
|
||||
platform: darwin
|
||||
contributors: GuillaumeRoss
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: query
|
||||
spec:
|
||||
name:
|
||||
platform: darwin, linux, windows
|
||||
description: Geolocate a host using the (ipapi.co)[https://ipapi.co] in an emergency. Requires the curl table. [Learn more](https://fleetdm.com/guides/locate-assets-with-osquery).
|
||||
query: >-
|
||||
SELECT JSON_EXTRACT(result, '$.ip') AS ip,
|
||||
JSON_EXTRACT(result, '$.city') AS city,
|
||||
JSON_EXTRACT(result, '$.region') AS region,
|
||||
JSON_EXTRACT(result, '$.country') AS country,
|
||||
JSON_EXTRACT(result, '$.latitude') AS latitude,
|
||||
JSON_EXTRACT(result, '$.longitude') AS longitude,
|
||||
FROM curl
|
||||
WHERE url = 'http://ipapi.co/json';
|
||||
purpose: inventory
|
||||
tags: inventory
|
||||
contributors: zwass
|
||||
|
|
|
|||
Loading…
Reference in a new issue