Giter Club home page Giter Club logo

asbuiltreport.netapp.ontap's People

Contributors

rebelinux avatar tpcarman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

asbuiltreport.netapp.ontap's Issues

Add Volume Footprint (Get-NcVolFootprint)

PS /home/rebelinux> Get-NcVolFootprint     

Volume                      TotalFootprint    VolumeBlocksFootprint       FlexvolMetadataFootprint Vserver
------                      --------------    ---------------------       ------------------------ -------
SAN_root                             20 MB                   448 KB                         208 KB SAN
Oracle_DB_Storage_vol_1              16 MB                   360 KB                          13 MB SAN

PS /home/rebelinux> 

Script ends when processing the storage section on 9.10.1P6

Hello,

I've run this on a 9.7 system without issue, but running against 9.10.1P6 the script exits on errors from the storage section. From my investigations I see that 9.10.1P6 is returning null values for aggr space used and raid type and this is causing the script to exit due to null values.

PS C:\asbuiltreport> $AggrSpace

Name                      State       TotalSize  Used  Available Disks RaidType        RaidSize  Volumes
----                      -----       ---------  ----  --------- ----- --------        --------  -------
HUENASCL1_01_NL_SAS_1     online        28.9 TB          28.9 TB  11                      14
HUENASCL1_02_NL_SAS_1     online        62.1 TB          59.4 TB  22                      22

For comparison, 9.7:

PS C:\asbuiltreport> $AggrSpace

Name                      State       TotalSize  Used  Available Disks RaidType        RaidSize  Volumes
----                      -----       ---------  ----  --------- ----- --------        --------  -------
aggr0_MBLBHCL1_01         online       159.9 GB   95%     7.7 GB   5   raid_dp, normal    14           1
aggr0_MBLBHCL1_02         online       159.9 GB   95%     7.7 GB   5   raid_dp, normal    14           1
MBLBHCL1_01_aggr1         online        31.8 TB   74%     8.2 TB   6   raid_dp, normal    14           4
MBLBHCL1_02_aggr1         online        31.8 TB   79%     6.6 TB   6   raid_dp, normal    14           4

Add Audit log destination

PS /home/rebelinux> Get-NcClusterLogForward -ONTAPI

Destination           : 192.168.5.1
Facility              : user
Force                 : False
NcController          : 192.168.7.60
Port                  : 614
Protocol              : udp_unencrypted
VerifyServer          : False
ForceSpecified        : True
PortSpecified         : True
VerifyServerSpecified : True


PS /home/rebelinux> 

Add Ontap Multi Admin Approval

PS /home/rebelinux> Get-NcSecurityMultiAdminApprovalGroup

NcController : 192.168.7.60
Approvers    : {admin, jcolonf}
Email        : {[email protected], [email protected]}
Name         : Prueba-MAP
OwnerName    : PHARMAX-HQ
OwnerUuid    : 8b6c9ee8-5ca8-11ed-b101-005056b053e3


PS /home/rebelinux> 
PS /home/rebelinux> Get-NcSecurityMultiAdminRule

Operation                                          Owner
---------                                          -----
security login password                            PHARMAX-HQ
security login unlock                              PHARMAX-HQ
security multi-admin-verify approval-group create  PHARMAX-HQ
security multi-admin-verify approval-group delete  PHARMAX-HQ
security multi-admin-verify approval-group modify  PHARMAX-HQ
security multi-admin-verify approval-group replace PHARMAX-HQ
security multi-admin-verify modify                 PHARMAX-HQ
security multi-admin-verify rule create            PHARMAX-HQ
security multi-admin-verify rule delete            PHARMAX-HQ
security multi-admin-verify rule modify            PHARMAX-HQ
set                                                PHARMAX-HQ

PS /home/rebelinux> 

Add Per Storage Volumes Attributes

PS /home/rebelinux/Projects> (Get-NcVol Oracle_DB_Storage_vol_1).VolumeSpaceAttributes

ExpectedAvailable                               : 33176526848
FilesystemSize                                  : 33178624000
IsFilesysSizeFixed                              : False
IsSpaceEnforcementLogical                       : False
IsSpaceGuaranteeEnabled                         : True
IsSpaceReportingLogical                         : False
IsSpaceSloEnabled                               : true
LogicalAvailable                                : 
LogicalUsed                                     : 2097152
LogicalUsedByAfs                                : 614400
LogicalUsedBySnapshots                          : 3686400
LogicalUsedPercent                              : 0
MaxConstituentSize                              : 
NcController                                    : 192.168.7.60
OverProvisioned                                 : 0
OverwriteReserve                                : 0
OverwriteReserveRequired                        : 0
OverwriteReserveUsed                            : 0
OverwriteReserveUsedActual                      : 0
PercentageFractionalReserve                     : 0
PercentageSizeUsed                              : 0
PercentageSnapshotReserve                       : 0
PercentageSnapshotReserveUsed                   : 0
PerformanceTierInactiveUserData                 : 
PerformanceTierInactiveUserDataPercent          : 
PhysicalUsed                                    : 2097152
PhysicalUsedPercent                             : 0
Size                                            : 33178624000
SizeAvailable                                   : 33176526848
SizeAvailableForSnapshots                       : 33176526848
SizeTotal                                       : 33178624000
SizeUsed                                        : 2097152
SizeUsedBySnapshots                             : 1482752
SnapshotReserveAvailable                        : 0
SnapshotReserveSize                             : 0
SpaceFullThresholdPercent                       : 98
SpaceGuarantee                                  : none
SpaceMgmtOptionTryFirst                         : volume_grow
SpaceNearlyFullThresholdPercent                 : 95
SpaceSlo                                        : none
ExpectedAvailableSpecified                      : True
FilesystemSizeSpecified                         : True
IsFilesysSizeFixedSpecified                     : True
IsSpaceEnforcementLogicalSpecified              : True
IsSpaceGuaranteeEnabledSpecified                : True
IsSpaceReportingLogicalSpecified                : True
LogicalAvailableSpecified                       : False
LogicalUsedByAfsSpecified                       : True
LogicalUsedBySnapshotsSpecified                 : True
LogicalUsedPercentSpecified                     : True
LogicalUsedSpecified                            : True
OverProvisionedSpecified                        : True
OverwriteReserveRequiredSpecified               : True
OverwriteReserveSpecified                       : True
OverwriteReserveUsedActualSpecified             : True
OverwriteReserveUsedSpecified                   : True
PercentageFractionalReserveSpecified            : True
PercentageSizeUsedSpecified                     : True
PercentageSnapshotReserveSpecified              : True
PercentageSnapshotReserveUsedSpecified          : True
PerformanceTierInactiveUserDataPercentSpecified : False
PerformanceTierInactiveUserDataSpecified        : False
PhysicalUsedPercentSpecified                    : True
PhysicalUsedSpecified                           : True
SizeAvailableForSnapshotsSpecified              : True
SizeAvailableSpecified                          : True
SizeSpecified                                   : True
SizeTotalSpecified                              : True
SizeUsedBySnapshotsSpecified                    : True
SizeUsedSpecified                               : True
SnapshotReserveAvailableSpecified               : True
SnapshotReserveSizeSpecified                    : True
SpaceFullThresholdPercentSpecified              : True
SpaceNearlyFullThresholdPercentSpecified        : True


PS /home/rebelinux/Projects> (Get-NcVol Oracle_DB_Storage_vol_1).VolumeAutosizeAttributes

GrowThresholdPercent            : 90
IncrementPercent                : 
IncrementSize                   : 
IsEnabled                       : True
MaximumSize                     : 17592186044416
MinimumSize                     : 33178624000
Mode                            : grow
NcController                    : 192.168.7.60
Reset                           : 
ShrinkThresholdPercent          : 50
GrowThresholdPercentSpecified   : True
IncrementPercentSpecified       : False
IncrementSizeSpecified          : False
IsEnabledSpecified              : True
MaximumSizeSpecified            : True
MinimumSizeSpecified            : True
ResetSpecified                  : False
ShrinkThresholdPercentSpecified : True


PS /home/rebelinux/Projects> 
PS /home/rebelinux/Projects> (Get-NcVol Oracle_DB_Storage_vol_1).VolumeInodeAttributes

BlockType                         : 64_bit
FilesPrivateUsed                  : 510
FilesTotal                        : 961896
FilesUsed                         : 111
InodefilePrivateCapacity          : 31136
InodefilePublicCapacity           : 31136
InofileVersion                    : 4
NcController                      : 192.168.7.60
FilesPrivateUsedSpecified         : True
FilesTotalSpecified               : True
FilesUsedSpecified                : True
InodefilePrivateCapacitySpecified : True
InodefilePublicCapacitySpecified  : True
InofileVersionSpecified           : True


PS /home/rebelinux/Projects> 
PS /home/rebelinux/Projects> (Get-NcVol Oracle_DB_Storage_vol_1).VolumeLanguageAttributes

IsConvertUcodeEnabled          : True
IsCreateUcodeEnabled           : True
Language                       : C.UTF-8 (POSIX with UTF-8)
LanguageCode                   : c.utf_8
NcController                   : 192.168.7.60
NfsCharacterSet                : utf-8|utf-8|Thu Oct  1 22:00:53 UTC 1998
OemCharacterSet                : ascii|cp1|Thu Oct  1 22:00:53 UTC 1998
IsConvertUcodeEnabledSpecified : True
IsCreateUcodeEnabledSpecified  : True


PS /home/rebelinux/Projects>

Add Aggregate Spare Disks (Get-NcAggrSpare)

PS /home/rebelinux> Get-NcAggrSpare -ONTAPI

Disk                          TotalSize DiskType        IsDiskShared   IsDiskZeroed  IsDiskZeroing  OriginalOwner
----                          --------- --------        ------------   ------------  -------------  -------------
VMw-1.10                         7.1 GB ssd                False          False          False      PHARMAX-HQ-01
VMw-1.2                          7.1 GB ssd                 True           True          False      PHARMAX-HQ-01
VMw-1.8                          7.1 GB ssd                 True           True          False      PHARMAX-HQ-01
VMw-1.9                          7.1 GB ssd                False          False          False      PHARMAX-HQ-01
VMw-1.23                         7.1 GB ssd                 True           True          False      PHARMAX-HQ-02
VMw-1.24                         7.1 GB ssd                 True           True          False      PHARMAX-HQ-02

PS /home/rebelinux> 

Add Audit Logs Support

Audit Setting:

PS /home/rebelinux> Get-NcAudit   

NcController : 192.168.7.60
CliGet       : False
HttpGet      : False
OntapiGet    : False
SnmpGet      : False


PS /home/rebelinux> 

Audit Logs:

PS /home/rebelinux> Get-NcAuditLog | Select-Object -First 3

Entry              : mlogd: started
NcController       : 192.168.7.60
Node               : PHARMAX-HQ-02
Seq                : 73014444035
Timestamp          : 1667611041
Application        : internal
CommandId          : 0000000000000000
Input              : mlogd: started
Location           : localhost
Message            : 
NodeUuid           : 9d7ec319-5ca7-11ed-80d4-005056b037f6
Scope              : cluster
SessionId          : 0000000000000000
State              : success
Vserver            : PHARMAX-HQ
User               : root
SeqSpecified       : True
TimestampSpecified : True

Entry              : mlogd: started
NcController       : 192.168.7.60
Node               : PHARMAX-HQ-01
Seq                : 90194313219
Timestamp          : 1667611153
Application        : internal
CommandId          : 0000000000000000
Input              : mlogd: started
Location           : localhost
Message            : 
NodeUuid           : e06f798e-5ca7-11ed-b101-005056b053e3
Scope              : cluster
SessionId          : 0000000000000000
State              : success
Vserver            : PHARMAX-HQ
User               : root
SeqSpecified       : True
TimestampSpecified : True

Entry              : TIME_INFO::{localhost,Etc/UTC,"11/5/2022 01:19:23 +00:00"}
NcController       : 192.168.7.60
Node               : PHARMAX-HQ-02
Seq                : 73014449707
Timestamp          : 1667611163
Application        : internal
CommandId          : 0000000000000000
Input              : TIME_INFO::{localhost,Etc/UTC,"11/5/2022 01:19:23 +00:00"}
Location           : localhost
Message            : 
NodeUuid           : 9d7ec319-5ca7-11ed-80d4-005056b037f6
Scope              : cluster
SessionId          : 0000000000000000
State              : success
Vserver            : PHARMAX-HQ
User               : root
SeqSpecified       : True
TimestampSpecified : True

PS /home/rebelinux> 

Add Consistency Group Support

Volume CG:

PS /home/rebelinux> (Get-NcVol).ConsistencyGroup                                                                      

Name
----
Oracle_DB_Storage

PS /home/rebelinux> 

Lun CG:

PS /home/rebelinux> (Get-NcLun).ConsistencyGroup

Links                       Name              Uuid
-----                       ----              ----
DataONTAP.C.Types.Lun.Links Oracle_DB_Storage c438fe24-5d1b-11ed-bc5b-005056b053e3
DataONTAP.C.Types.Lun.Links Oracle_DB_Storage c438fe24-5d1b-11ed-bc5b-005056b053e3
DataONTAP.C.Types.Lun.Links Oracle_DB_Storage c438fe24-5d1b-11ed-bc5b-005056b053e3

PS /home/rebelinux> 

CG Snapshot:

PS /home/rebelinux> $CG = (Get-NcVol).ConsistencyGroup.Name                                               
PS /home/rebelinux> Get-NcConsistencyGroupSnapshots -ConsistencyGroup $CG                                 

ConsistencyGroupName      SnapshotCopyName     ConsistencyType      Vserver
--------------------      ----------------     ---------------      -------
Oracle_DB_Storage         Prueba               crash                SAN

PS /home/rebelinux> 

Error for each license check for each node in the cluster in ONTAP v9.10+

Get-NcLicenseEntitlementRisk : [400]: The value "entitlement" is invalid for field "fields" (<field,...>)
At C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.NetApp.ONTAP\0.6.4\Src\Private\Get-AbrOntapClusterLicense.ps1:34 char:52
+ ... ementRisk = Get-NcLicenseEntitlementRisk -Package $Licenses.Package - ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-NcLicenseEntitlementRisk], Exception
    + FullyQualifiedErrorId : 400,DataONTAP.C.PowerShell.SDK.Cmdlets.License.GetNcLicenseEntitlementRisk

Error for each license check for each node in the cluster.

Originally posted by @cse-gh in #22 (comment)

Error in ONTAP System TimeZone information section in ONTAP v9.10+

And one last error near the end of the process which may have already existed.

VERBOSE: [ 10:56:04:090 ] [ Document ] - Processing blank line.
VERBOSE: [ 10:56:04:122 ] [ Document ] - Collecting ONTAP System TimeZone information.
WARNING: [ 10:56:04:516 ] [ Document ] - Cannot convert argument "value", with value: "System.Object[]", for "AddSeconds" to type "System.Double": "Cannot convert the "System.Object[]" value of type "System.Object[]" to type 
"System.Double"."
VERBOSE: [ 10:56:04:525 ] [ Document ] - Processing table 'System TimeZone - HUENASCL1'.
WARNING: [ 10:56:04:535 ] [ Document ] - Cannot bind argument to parameter 'Rows' because it is an empty collection.
VERBOSE: [ 10:56:04:781 ] [ Document ] - Processing section 'NTP Configuration' started.
VERBOSE: [ 10:56:04:816 ] [ Document ] - Collecting ONTAP System NTP information.
VERBOSE: [ 10:56:05:016 ] [ Document ] - Processing table 'System Network Time Protocol - HUENASCL1'.
VERBOSE: [ 10:56:05:038 ] [ Document ] - Processing section 'NTP Configuration' completed.
VERBOSE: [ 10:56:05:051 ] [ Document ] - Processing section 'System Timezone Configuration' completed.
VERBOSE: [ 10:56:05:068 ] [ Document ] - Processing section 'System Configuration Information' completed.
VERBOSE: [ 10:56:05:085 ] [ Document ] - Processing section 'HUENASCL1 Cluster Report' completed.
VERBOSE: [ 10:56:05:199 ] [ Document ] - Document 'NetApp ONTAP As Built Report' processing completed.
VERBOSE: [ 10:56:05:213 ] [ Document ] - Total processing time '1.71' minutes.

Originally posted by @cse-gh in #22 (comment)

Cannot import-module for use

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Open Powershell console or ISE
  2. Import-Module .\AsBuiltReport.NetApp.ONTAP-0.3.0\AsBuiltReport.NetApp.ONTAP.psm1
  3. See error:
    D:\GIT_REPO\AsBuiltReport.NetApp.ONTAP-0.3.0\AsBuiltReport.NetApp.ONTAP.psm1 : Failed to import function

Expected behavior
Import-Module should import the module for standard use.

Screenshots
Import-Module .\AsBuiltReport.NetApp.ONTAP-0.3.0\AsBuiltReport.NetApp.ONTAP.psm1
D:\GIT_REPO\AsBuiltReport.NetApp.ONTAP-0.3.0\AsBuiltReport.NetApp.ONTAP.psm1 : Failed to import function D:\GIT_REPO\AsBuiltReport.NetApp.ONTAP-0.3.0\Src\Private\Get-AbrOntapNetworkMGMT.ps1: At
D:\GIT_REPO\AsBuiltReport.NetApp.ONTAP-0.3.0\Src\Private\Get-AbrOntapNetworkMGMT.ps1:36 char:97

  • ... 'Status' = if ($Item.OpStatus) {$Item.OpStatus.ToString().ToUpper()}
  •                                                                      ~
    

The hash literal was incomplete.
At D:\GIT_REPO\AsBuiltReport.NetApp.ONTAP-0.3.0\Src\Private\Get-AbrOntapNetworkMGMT.ps1:37 char:29

  •                         'Data Protocols' = $Item.DataProtocols
    
  •                         ~~~~~~~~~~~~~~~~
    

Unexpected token ''Data Protocols'' in expression or statement.
At D:\GIT_REPO\AsBuiltReport.NetApp.ONTAP-0.3.0\Src\Private\Get-AbrOntapNetworkMGMT.ps1:1 char:34

  • function Get-AbrOntapNetworkMgmt {
  •                              ~
    

Missing closing '}' in statement block or type definition.
At D:\GIT_REPO\AsBuiltReport.NetApp.ONTAP-0.3.0\Src\Private\Get-AbrOntapNetworkMGMT.ps1:68 char:93

  • ... 'Status' = if ($Item.OpStatus) {$Item.OpStatus.ToString().ToUpper()}
  •                                                                      ~
    

The hash literal was incomplete.
At D:\GIT_REPO\AsBuiltReport.NetApp.ONTAP-0.3.0\Src\Private\Get-AbrOntapNetworkMGMT.ps1:69 char:25

  •                     'Data Protocols' = $Item.DataProtocols
    
  •                     ~~~~~~~~~~~~~~~~
    

Unexpected token ''Data Protocols'' in expression or statement.
At D:\GIT_REPO\AsBuiltReport.NetApp.ONTAP-0.3.0\Src\Private\Get-AbrOntapNetworkMGMT.ps1:89 char:9

  •     }
    
  •     ~
    

Unexpected token '}' in expression or statement.
At D:\GIT_REPO\AsBuiltReport.NetApp.ONTAP-0.3.0\Src\Private\Get-AbrOntapNetworkMGMT.ps1:100 char:97

  • ... 'Status' = if ($Item.OpStatus) {$Item.OpStatus.ToString().ToUpper()}
  •                                                                      ~
    

The hash literal was incomplete.
At D:\GIT_REPO\AsBuiltReport.NetApp.ONTAP-0.3.0\Src\Private\Get-AbrOntapNetworkMGMT.ps1:101 char:29

  •                         'Data Protocols' = $Item.DataProtocols
    
  •                         ~~~~~~~~~~~~~~~~
    

Unexpected token ''Data Protocols'' in expression or statement.
At D:\GIT_REPO\AsBuiltReport.NetApp.ONTAP-0.3.0\Src\Private\Get-AbrOntapNetworkMGMT.ps1:122 char:9

  •     }
    
  •     ~
    

Unexpected token '}' in expression or statement.
At D:\GIT_REPO\AsBuiltReport.NetApp.ONTAP-0.3.0\Src\Private\Get-AbrOntapNetworkMGMT.ps1:132 char:93

  • ... 'Status' = if ($Item.OpStatus) {$Item.OpStatus.ToString().ToUpper()}
  •                                                                      ~
    

The hash literal was incomplete.
Not all parse errors were reported. Correct the reported errors and try again.
At line:1 char:1

  • Import-Module .\AsBuiltReport.NetApp.ONTAP-0.3.0\AsBuiltReport.NetApp ...
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,AsBuiltReport.NetApp.ONTAP.psm1
    
    

Desktop (please complete the following information):

  • OS: Windows 10 (^$bit)
  • PS 5.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.