diff --git a/docs/01-Using-Fleet/standard-query-library/standard-query-library.yml b/docs/01-Using-Fleet/standard-query-library/standard-query-library.yml index f00f447606..dfa8705551 100644 --- a/docs/01-Using-Fleet/standard-query-library/standard-query-library.yml +++ b/docs/01-Using-Fleet/standard-query-library/standard-query-library.yml @@ -184,6 +184,15 @@ spec: contributors: zwass --- apiVersion: v1 +kind: policy +spec: + name: Get Ubuntu Advantage (Ubuntu Pro) attachment status + platform: linux + description: Checks to see if the Ubuntu Pro status file exists, and ensures attachment and expiry are as expected. Combine with a script automation to run the attach command for remediation. + query: SELECT 1 FROM parse_json WHERE path = '/var/lib/ubuntu-advantage/status.json' AND ((key = 'attached' AND value = 'true') OR (key = 'expires' AND datetime(value) > datetime('now'))) GROUP BY path HAVING SUM(CASE WHEN key = 'attached' AND value = 'true' THEN 1 ELSE 0 END) = 1 AND SUM(CASE WHEN key = 'expires' AND datetime(value) > datetime('now') THEN 1 ELSE 0 END) = 1; + contributors: GrayW +--- +apiVersion: v1 kind: query spec: name: Get authorized SSH keys