Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all data present in excel #206

Open
BrandonCline85 opened this issue Aug 13, 2024 · 26 comments
Open

Not all data present in excel #206

BrandonCline85 opened this issue Aug 13, 2024 · 26 comments

Comments

@BrandonCline85
Copy link

When running versions 3.1.13 and 3.1.38, I'm noticing discrepancies in the output for resources, with some resources not displaying the correct amounts. Is there a workaround for this, or is it a new issue?
ARI 8-13-24

@Claudio-Merola
Copy link
Collaborator

Hello @BrandonCline85

Looks like something that should be fixed already.

Can you run the version 3.1.38 with -Debug and see how many Jobs run at the same time during the "Processing Inventory" ?

@BrandonCline85
Copy link
Author

Yes, I can run that and paste the output here. It might be tomorrow before I can get to it though.

@BrandonCline85
Copy link
Author

BrandonCline85 commented Aug 19, 2024

image
image
image

The output is still showing incorrect numbers for the NSG's and Key Vaults.

@Claudio-Merola
Copy link
Collaborator

Hi @BrandonCline85

Thanks for the output. The incorrect numbers are just in the Overview tab or in the Key Vault tab there is indeed only 10 different key vaults?

@BrandonCline85
Copy link
Author

On the NSG's it is showing 13 on the overview, 63 in the tab and the azure portal only has 24

@BrandonCline85
Copy link
Author

Key vaults it shows 10 in the overview, 56 in the tab and there are 13 in the azure portal

@Claudio-Merola
Copy link
Collaborator

@BrandonCline85

Yes, because the script will add one line for each "Access Policy" in the Key Vault tab and for NSG it will add one line for each "Security Rule". But the number of unique resources in these tabs are 13 or 24 (for the NSG) and 10 or 13 (for the key vaults)?

@BrandonCline85
Copy link
Author

Correct.

@Claudio-Merola
Copy link
Collaborator

Hello, I just released the version 3.5. and since we changed a lot of how the script works (it's no longer a script, but a Powershell Module) and we completely remove the need of az cli as we changed 100% to powershell. This might have changed the previous behavior.

Do you mind and give a try to new version so we can validate if this issue is fixed?

Thanks

@BrandonCline85
Copy link
Author

BrandonCline85 commented Sep 2, 2024 via email

@BrandonCline85
Copy link
Author

Key Vaults is still showing only 10 items in the spreadsheet and there are 13 currently being used. Azure Firewall is only displaying 1 firewall in the spreadsheet, when there are 2 in place. Please let me know if you need any further info from me. Thanks.

@dersteppenwolf
Copy link

Testing with version 3.5: PostgreSQL Flexible appears as 0 but should be 7.

@Claudio-Merola
Copy link
Collaborator

@BrandonCline85 , does the missing Key Vaults have Access Policies configured?

@dersteppenwolf, that is just in the Overview or the PostgreeSQL Flexible sheet is also empty?

@dersteppenwolf
Copy link

in the Overview or the PostgreeSQL Flexible sheet is also empty?

Both

@BrandonCline85
Copy link
Author

@Claudio-Merola yes there are access policies configured on 10 of them. I'm guessing that is why the other 3 didn't show up in the report.

@Claudio-Merola
Copy link
Collaborator

@BrandonCline85 , got it. It should be fixed in the next version (3.5.1). We intend to release it next week.

@dersteppenwolf

Can you check if the resource type of the PostgreeSQL Flexible you have in your environment is: "Microsoft.DBforPostgreSQL/flexibleServers"?

You can check that in the "JSON View" of any your resources.

@dersteppenwolf
Copy link

Can you check if the resource type of the PostgreeSQL Flexible you have in your environment is: "Microsoft.DBforPostgreSQL/flexibleServers"?

You can check that in the "JSON View" of any your resources.
Looks like this:
//Microsoft.DBforPostgreSQL/flexibleServers/

@Claudio-Merola
Copy link
Collaborator

@dersteppenwolf

That is strange. Can you run the script adding the "-Debug" parameter and post the output here?

@dersteppenwolf
Copy link

dersteppenwolf commented Sep 5, 2024

@dersteppenwolf

That is strange. Can you run the script adding the "-Debug" parameter and post the output here?

Command:

Invoke-ARI -TenantID xxxx -DiagramFullEnvironment -ReportDir “C:\tmp\AzureResourceInventory\” -QuotaUsage -SecurityCenter -Debug

Some examples from the output:

DEPURACIÓN: 7:50:07 a. m. - GetAzureRmAccessTokenCommand end processing.
ConvertFrom-SecureString : No se encuentra ningún parámetro que coincida con el nombre del parámetro 'AsPlainText'.
En C:\Program Files\WindowsPowerShell\Modules\AzureResourceInventory\3.5.0\Modules\Inventory\ARIAPIInv.psm1: 17 Carácter: 58
$TokenData = $Token.Token | ConvertFrom-SecureString -AsPlainText
CategoryInfo : InvalidArgument: (:) [ConvertFrom-SecureString], ParameterBindingException
FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.ConvertFromSecureStringCommand

DEPURACIÓN: 2024-09-05_07_52_26 - Running Module: 'CosmosDB'. Lines Count: 23
DEPURACIÓN: 2024-09-05_07_52_27 - Running Module: 'POSTGREFlexible'. Lines Count: 7

ADVERTENCIA: Algunos nombres de comando importados del módulo 'AzureResourceInventory' incluyen verbos no aprobados que podrían dificultar su reconocimiento. Para encontrar los comandos con verbos
no aprobados, vuelva a ejecutar el comando Import-Module con el parámetro Verbose. Para obtener una lista de verbos aprobados, escriba Get-Verb.
DEPURACIÓN: 2024-09-05_07_52_53 - Checking if Should Generate Policy Sheet.
get-job : El comando no puede encontrar el trabajo porque no se encontró el nombre Policy. Compruebe el valor del parámetro Name e intente ejecutar el comando de nuevo.
En C:\Program Files\WindowsPowerShell\Modules\AzureResourceInventory\3.5.0\Modules\Core\ARIExtraJobs.psm1: 261 Carácter: 12
if(get-job -Name 'Policy')
CategoryInfo : ObjectNotFound: (Policy:String) [Get-Job], PSArgumentException
FullyQualifiedErrorId : JobWithSpecifiedNameNotFound,Microsoft.PowerShell.Commands.GetJobCommand

DEPURACIÓN: 2024-09-05_07_52_53 - Checking if Should Generate Advisory Sheet.

@Claudio-Merola
Copy link
Collaborator

@dersteppenwolf

That is odd.

"Running Module: 'POSTGREFlexible'. Lines Count: 7"

This indicate the Postgree Flexible itself was processed correctly and 7 lines should have been added to the Excel file.

The PostgreeSQL Flexible sheet is totally blank and no resources are present? or it has the column titles and there is no resources?

@dersteppenwolf
Copy link

The PostgreeSQL Flexible sheet is totally blank and no resources are present? or it has the column titles and there is no resources?

The sheet es totally blank.

@Claudio-Merola
Copy link
Collaborator

Hey @dersteppenwolf

I just published the version 3.5.1 of the module and this issue should be fixed. Can you try to upgrade your version of the module and try again?

Thanks

@dersteppenwolf
Copy link

Hey @dersteppenwolf

I just published the version 3.5.1 of the module and this issue should be fixed. Can you try to upgrade your version of the module and try again?

Thanks

The command takes too much time and doesn't finish.

@Claudio-Merola
Copy link
Collaborator

@dersteppenwolf

Are you running the script with "-Debug" so we can see what the script is doing?

Copy link

This Issue is stale and may be automatically close soon.

@dersteppenwolf
Copy link

dersteppenwolf commented Oct 17, 2024

The sheet is again totally blank.

Version:

Get-InstalledModule -Name AzureResourceInventory
Version Name Repository Description
3.5.7 AzureResourceInventory PSGallery

Command:

Invoke-ARI -TenantID xxx -DiagramFullEnvironment -ReportDir “C:\tmp\AzureResourceInventory\” -QuotaUsage -SecurityCenter -Debug

Log:

DEPURACIÓN: 2024-10-16_20_40_19 - Running Module: 'POSTGREFlexible'. Lines Count: 7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants