bseltz-cohesity / scripts

Cohesity REST API examples in PowerShell and Python
Apache License 2.0
104 stars 41 forks source link

clusterStorageStats.ps1 cannot calculate Data Reduction on 1 cluster #138

Closed pge92 closed 11 months ago

pge92 commented 11 months ago

hi, weird, the script is not able to calculate the data reduction for one cluster (but it manages it for the other physical cluster and the VE/Robo) ; here is the output :

./clusterStorageStats.ps1 -vip coh10 -username readerapi
Connected!

Stats for clusterCOH10:

         Capacity: 1,247.2 TiB
         Consumed: 664.7 TiB
             Free: 582.5 TiB
     Percent Used: 53%
Storage Reduction: 48.7x
   Data Reduction: 0x <----------------------------------------------------------------

==> i've just added a write-output($dataReduction) after line 74 in the script to see if it does the calculation, here is the result, here is the output :

./clusterStorageStats_pge.ps1 -vip coh10 -username readerapi
Connected!
0

Stats for clusterCOH10:

         Capacity: 1,247.2 TiB
         Consumed: 664.5 TiB
             Free: 582.7 TiB
     Percent Used: 53%
Storage Reduction: 48.7x
   Data Reduction: 0x
5.1
5.1
5.3
5
5
5.1
5.2
5.4
5.3
5.3
5.1
5
4.9
4.9
5.1
5.2
5.1
5
4.7
4.7
4.7
4.7
4.7
4.8
4.9
4.5
4.5
5
5
4.8
4.8

==> do you have an idea why it does no more calculate the ratio ? i've the script many times on this cluster and it gave a correct ratio a few days ago coh cluster is 6.8.1_u5_release-20230907_89061e30 thank you for your help

bseltz-cohesity commented 11 months ago

HI @pge92 the dataInStats and the dataWrittenStats are periodically generated by an Apollo pipeline. If this pipeline is not completing successfully, then those stats will return zeros. You can check by reviewing advanced diagnostics: Apollo MR Stats -> BrickBytesLogical (dataIn) Apollo MR Stats -> ChunkBytesMorphed (dataWritten)

Screenshot 2023-12-20 at 10 48 55 AM
pge92 commented 11 months ago

thx for your answer looking in advanced stats the collection seems to be done image

i just saw that when i change the -days to something else than default it can give a result. il means one of the collection days was perhaps 0 and it put all the result to zero ?

 ./clusterStorageStats.ps1 -vip coh10 -username readerapi -days 30
Connected!

Stats for clusterCOH10:

         Capacity: 1,247.3 TiB
         Consumed: 663.4 TiB
             Free: 583.9 TiB
     Percent Used: 53%
Storage Reduction: 48.8x
   Data Reduction: 5.1x

 ./clusterStorageStats.ps1 -vip coh10 -username readerapi -days 31
Connected!

Stats for clusterCOH10:

         Capacity: 1,247.2 TiB
         Consumed: 663.0 TiB
             Free: 584.2 TiB
     Percent Used: 53%
Storage Reduction: 48.8x
   Data Reduction: 0x
bseltz-cohesity commented 11 months ago

Odd. I'm unable to reproduce that issue. Can you download the latest version of the script just to make sure you are using the latest code: https://github.com/bseltz-cohesity/scripts/tree/master/reports/powershell/clusterStorageStats

pge92 commented 11 months ago

hi, sorry for the delay. i've downloaded the last version as i'm able to get the correct data by modifying the -days, i'm ok with the result, and i'm able to build a result file. thank you for your support, and congrats for your huge work on the scripts ; this is awfull and most of them are very very usefull :)