Comments (13)
Hello,
This is very strange. Running the inventory for other environments is ok?
The types of resources in the tenant are like VMs and AKS and etc?
from ari.
from ari.
No, the subscription is sum in another variable....
I'm starting to suspect the script is failing to collect the other resources because some property of the second resource is crashing the Azure Resource Graph query...
Can you run the following?
Just to see if more resources are listed:
az login -t TENANTID
$GraphQuery = "resources | where strlen(properties.definition.actions) < 123000 | project id,name,type,tenantId,kind,location,resourceGroup,subscriptionId,managedBy,sku,plan,properties,identity,zones | order by id asc"
az graph query -q $GraphQuery --skip $Limit --first 1000 --output json --only-show-errors
from ari.
from ari.
Ok,
The only parameters you are using when running the script are: -tenantID and -SecurityCenter?
What version of az cli and resource-graph extension are you running?
from ari.
from ari.
I just tested with the exact same version and it runs normally.
Let's see what is this one resource it is reporting...
Can you see what is inside the variable $Resources after the script is run?
Thanks
from ari.
from ari.
May you run the following to see the types of resources being collected?
az login -t TENANTID
$Global:Resources = @()
$GraphQuery = "resources | where strlen(properties.definition.actions) < 123000 | summarize count()"
$EnvSize = az graph query -q $GraphQuery --output json --only-show-errors | ConvertFrom-Json
$EnvSizeNum = $EnvSize.data.'count_'
Write-Host ('Resources counted: '+$EnvSizeNum)
if ($EnvSizeNum -ge 1) {
$Loop = $EnvSizeNum / 1000
$Loop = [math]::ceiling($Loop)
$Looper = 0
$Limit = 0
while ($Looper -lt $Loop) {
$GraphQuery = "resources | where strlen(properties.definition.actions) < 123000 | project id,name,type,tenantId,kind,location,resourceGroup,subscriptionId,managedBy,sku,plan,properties,identity,zones,extendedLocation$($GraphQueryTags) | order by id asc"
$Resource = (az graph query -q $GraphQuery --skip $Limit --first 1000 --output json --only-show-errors).tolower() | ConvertFrom-Json
write-host ('Resources Inside Loop: '+$Resource.data.count)
$Global:Resources += $Resource.data
Start-Sleep 2
$Looper ++
$Limit = $Limit + 1000
}
}
$Resources | Group-Object -Property type | Select-Object -Property Name,Count | Sort-Object -Property count -Descending
from ari.
from ari.
from ari.
I've been trying to think of any case that may cause that issue.
But so far I cannot see any reason for that to happen. I have try the same versions, a similar environment size, similar type of resources but it always works.
Since we are getting a newer version of the script ready, I believe the best approach would be to wait for the newer version to be release and see how it behaves in that environment.
from ari.
This Issue is stale and may be automatically close soon.
from ari.
Related Issues (20)
- Draw.IO only generating 11kb Xml File HOT 3
- Feature Request: Add Support for StateRAMP/FedRAMP Inventory format HOT 5
- Get-AzContext does not gather all the subscriptions HOT 3
- It does not export if I include the -ResourceGroup flag. HOT 2
- ARI generates report after almost 1.5hrs HOT 2
- IP addressess in wrong format HOT 4
- Cannot open XML file HOT 2
- Visio diagram not being generated HOT 14
- Overlapping diagrams HOT 5
- IP address strings are converted in numbers HOT 1
- Resrevations Request HOT 2
- "Jobs Still Running: 1" gets stuck HOT 8
- ThreadJob NotStarted HOT 8
- Az Cloud Shell OK, but Powershell (even with Azure Cli installed) stalls HOT 3
- ARI Script stalling out HOT 6
- Please remove the function that delete Excel files in the specified report directory HOT 5
- AVD / Windows 365 separated resources HOT 2
- Automation Account Problem HOT 3
- Add List Reserved Intances resources with their use ? HOT 1
- Trying to use Service Principal Authentication Method in a wrong way HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ari.