Skip to content

Commit

Permalink
add query pack to count assets in env
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Münch <[email protected]>
  • Loading branch information
atomic111 committed Jul 11, 2023
1 parent 88028dc commit da5b5c2
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions extra/mondoo-count-assets.mql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
packs:
- uid: mondoo-count-assets
name: Counts Assets in your environment
queries:
- uid: mondoo-count-assets-on-vsphere-cluster-esxi
title: Retrieve all ESXi hosts
filters: asset.platform == 'vmware-vsphere'
query: |
vsphere.datacenters { hosts.length }
- uid: mondoo-count-assets-on-vsphere-cluster-vms
title: Retrieve all VMs from vsphere cluster
filters: asset.platform == 'vmware-vsphere'
query: |
vsphere.datacenters { vms.length }
- uid: mondoo-count-assets-on-azure
title: Retrieve all VMs from Azure
filters: asset.platform == 'azure'
query: |
azure.compute.vms.length
- uid: mondoo-count-users-in-azure
title: Retrieve all VMs from Azure
filters: asset.platform == 'azure' || asset.platform == 'microsoft365'
query: |
azuread.users.length
- uid: mondoo-count-assets-on-aws
title: Retrieve all VMs from AWS
filters: asset.platform == 'aws'
query: |
aws.ec2.instances.length
- uid: mondoo-count-assets-in-windows-domain
title: Retrieve all computer object from the windows domain
filters: asset.platform == "windows" && windows.computerInfo['OsProductType'] == 2
query: |
parse.json(content: powershell('Get-ADComputer -Filter * -properties * | select Name, Enabled,Operatingsystem,OperatingSystemVersion | ConvertTo-Json').stdout).params

Check failure on line 34 in extra/mondoo-count-assets.mql.yaml

View workflow job for this annotation

GitHub Actions / Run spell check

`Operatingsystem` is not a recognized word. (unrecognized-spelling)

0 comments on commit da5b5c2

Please sign in to comment.