This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

NAS Disk Volume Monitoring

We have been asked to monitor Shared NAS Disk Volume from a NetApp File Server. Has anyone had any success monitoring the shared NAS disk volumes URL through NPM, SAM or SRM?

NPM:

The only way I think NPM can monitoring the NAS is if its detected during the device discovery. 

SAM:

SAM has a Directory Size Monitor that will allow us to access the \\fileserver.com URL   (Has anyone got this to working or does this require WMI or an Agent to perform) 

SRM:

I know SRM can monitor disk volumes on the whole storage array but I am not sure if it can alert on the Sub fileserver shared directory's/ URL's 

Any recommendations would be a big help!

  • Is the file share accessible from the Orion Server itself (ie. can you just open \\fileserver\share\directory from that server)?  If so, they can you can create a SAM template that uses a PowerShell script to get the size of the folder.  That's the way I would go, but then again, I almost always use PowerShell for things, so take my advice with a grain of NaCL.

  • The file share URL's are not available to the Orion Server, I was thinking about putting a Orion Agent on a server that did have access to \\fileserver\share\directory via WMI/Agent to performed the PowerShell script.  

    Do you have any example or URL of a SAM PowerShell script to get the size of the folder?

  • I'm 90% sure that there's an example in the SAM Template Content Exchange (CX), but I always seem to write my own as I find new and better ways to do things in PowerShell.

    <#
    This is quick and dirty - for more information about how I write PowerShell SAM templates, you can read:
      https://blog.kmsigma.com/2017/09/08/sam-powershell-scripting-template/
      https://blog.kmsigma.com/2018/01/10/sam-script-multi-statistic/
    #>
    
    # This is the Path to Check - you can also use the 'script parameters' in SAM and then use '$args[0]' as the variable.
    $PathToCheck = "\\KMS-NAS\Documents"
    # Get a list of all the files in the folder, recursively, and select only the Name and the Length (Size of the file)
    # Use -Force to get files that also hidden or system files
    $Files = Get-ChildItem -Path $PathToCheck -Recurse -Force -File | Select-Object -Property Name, Length
    $FileCount = $Files.Count
    # Get the size of all the files by summing the lengths of all the files.
    $SizeInBytes = $Files | Measure-Object -Property Length -Sum | Select-Object -ExpandProperty Sum
    # Write the output in the format:
    # Message.(Element): Informational message about Element <-- Optional, but nice for readability
    # Statistic.Element: ####
    Write-Host "Message.Count: The '$PathToCheck' folder contains $( $FileCount ) file(s)."
    Write-Host "Statistic.Count: $( $FileCount )"
    Write-Host "Message.Size: The '$PathToCheck' folder is $( ( $SizeInBytes / 1GB ).ToString("0.00") ) GB"
    Write-Host "Statistic.Size: $SizeInBytes"
    # Exit with a 0 indicates that it ran clean.  This should probably have some other logic for error-trapping (folder does not exist, don't have access to files, etc.
    exit(0)
    

    On my computer, it returns:

     

    Message.Count: The '\\KMS-NAS\Documents' folder contains 77477 file(s).
    Statistic.Count: 77477
    Message.Size: The '\\KMS-NAS\Documents' folder is 218.72 GB
    Statistic.Size: 234847859171

    If it were me, I might also add a "how long it took to enumerate the file share" because that may be an interesting metric for me.  For something like this, I wouldn't poll very frequently (if there are a bunch of files) - maybe once an hour or less.

  • thanks for the help, I will try out the scrip and see what I get back from the scrip