What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Measure disk latency on NFS (Vmware) datastore

Votes:

0

Hi! I have a OmniOS/Solaris (All-In-one) VM (onto a local Vmware VSphere host) sharing a NFS Datastore to the same vSphere host.

Please correct me if Im wrong: The problem here with many (almsot all) performance monitoring software is to monitor latency on the Solaris NFS datastore, Vmware NFS datastore and also I want to monitor the latency on the VMs.

I have created a Vmware SOAP sensor and I can see all the virtual machines perfectly. On the VMs on the local Vmware datastore I can monitor the disk latency etc On the Solaris VM (placed on local datastore) I can also monitor the disk latency.

How do I monitor the latency on the Solaris NFS datastore? (I could tru SNMP if I had MIBS and a good SNMP package but I dont). How do I monitor the (disk) latency on the vSphere VMs on the NFS datastore? How do I monitor the latency on the NFS datastore?

Thanks for your suggestions and answers. J

disk latency napp-it omnios performance snmp vmware

Created on Jul 2, 2014 11:15:16 PM



5 Replies

Votes:

0

Looking at our environment here, almost all of our new VM's are running off NFS datastores and through SOAP we are able to pull the latency of the VM to the datastore and put it into PRTG. With these sensors, we are just pulling the information directly from VSphere which should be measuring this properly.

Created on Jul 3, 2014 3:16:19 PM by  Greg Campion [Paessler Support]



Votes:

0

Hi again and thank you for your answer! The problem (not able to see the NFS Storage read/write Latency) were due to a problem in VMware 5.5:

http://rainbow.chard.org/2012/04/23/restoring-datastore-performance-graphs-after-upgrading-to-vcenter-5-0u1/

http://alpacapowered.wordpress.com/2012/12/17/control-vcenter-performance-counter-collection-and-get-back-vm-iops-statistics/

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2009532

https://communities.vmware.com/thread/403964

I am now able to get the stats for read write latency (per VM) on the NFS datastores they are running on. But if I want latency per Datastore there is a solution in PRTG Beta (if its not already released ?):

https://kb.paessler.com/en/topic/51333-monitor-datastore-latency-individually-under-vmware-vsphere-5

Until that PRTG version is released:

Have tried SNMP I have imported the Vmware MIBS (Host_Resources MIB) into PRTG and created a SNMP Sensor against Vmware:

https://www.paessler.com/tools/mibimporter

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1013445

https://communities.vmware.com/thread/167927

Couldnt find any SNMP Datastore objects there...? Anyone now the correct OID? Will also try to import the (ROOT MIB), havent tried it yet and see if there are any SNMP Vmware Datastore objects there.

Last resort is to use scripts and PowerShell: https://kb.paessler.com/en/topic/29313-vmware-snapshots https://kb.paessler.com/en/topic/39893-custom-sensor-with-own-message http://www.lucd.info/2011/04/22/get-the-maximum-iops/

PRTG Custom Sensor with PowerShell http://blogs.lockstepgroup.com/2013/06/the-extreme-basics-of-prtg-custom-sensors-with-powershell.html

PRTG Custom Sensor with XML file Could maybe convert any of the CACTI scripts (and XML files) out there for monitoring Vmware and Solaris / OmniOS / Nexenta (Napp-IT).

http://www.hypervisor.fr/?p=4010

http://jose-manuel.me/2012/10/how-extend-the-snmp-agent-in-solaris-to-get-zfs-attributes-part-1/ http://jose-manuel.me/2012/11/how-extend-the-snmp-agent-in-solaris-to-get-zfs-attributes-part-2/

http://www.lucd.info/2011/06/19/datastore-usage-statistics/

http://sylt.se/cacti-graph-for-solaris-zfs-memory/

http://forums.cacti.net/viewtopic.php?f=12&t=47979

http://blogs.dootdoot.com/mike/2012/06/26/zfs-monitoring-and-cacti-part-2/ http://blogs.dootdoot.com/mike/2012/07/03/zfs-monitoring-and-cacti-part-4/

Joakim Lindgren

Created on Jul 6, 2014 10:57:13 PM



Votes:

0

At the moment we don't have a sensor developed in any version of PRTG that can monitor the mounted datastore directly, we need to rework the VMware sensors completely and this is taking more time that originally expected.

I cannot say when this sensor will be available directly in PRTG but most likely your best chance at monitoring these stats will be with a custom sensor that can access the PowerCLI. Unfortunately we don'd have the time right now to help you develop a custom sensor for this though.

Created on Jul 9, 2014 8:44:07 AM by  Greg Campion [Paessler Support]



Votes:

0

Hi again Guys, I have now completed my quick and dirty VMware PowerCLI script for collecting NFS latency Performance Counters from ESXi / vSphere and publishing these values into PRTG Monitor (Custom XML Sensor).

It was a couple of years ago I did some courses in programming so please bee nice ;-)

Once again I would like to thank (Sensei) LucD for all of his assistance all over the VMware forum(s).

Here are my script for others to use, please add any comments, optimizations or suggestions if I could do this a better way ;-)

Script:

$VIServer = "x.x.x.x"

Add-PSSnapin VMware.VimAutomation.Core -ErrorAction "SilentlyContinue"

function InitializePCLI($VIServer) {

  # add VMware PS snapin

  if (-not (Get-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue)) {

      Add-PSSnapin VMware.VimAutomation.Core

  }

  

  # Set PowerCLI to single server mode

  #Set-PowerCLIConfiguration -DefaultVIServerMode Single -Confirm:$False

  

  # connect vCenter server session

  if ($VIServer -eq $null) {

      Connect-VIServer $VIServer -Protocol https -User username -Password xxxx | Out-Null

  } else {

      Connect-VIServer $VIServer -Protocol https -User username -Password xxxx | Out-Null

  }

}

InitializePCLI($VIServer)

    $stat = "datastore.totalWriteLatency.average"

    #$start = (Get-Date).AddDays(-5)

    #$start = (Get-Date).AddMinutes(-1)

    $start = (Get-Date).AddSeconds(-20)

    

echo '<?xml version="1.0" encoding="Windows-1252" ?>'

echo '<prtg>'

    Get-Datastore | where {$_.Type -eq "NFS"} | %{

      $dsName = $_.Name

      $uuid = $_.ExtensionData.Info.Url.Split('/')[-2]

        $colItems = Get-VMHost -Datastore $_ |

        Get-Stat -Stat $stat -Start $start |

        where {$_.Instance -eq $uuid} | 

        Select Timestamp,MetricId,Value,@{N="Datastore";E={$dsName}}

            foreach ($objItem in $colItems) {

                if ($_.Name -eq $dsName) {

echo    '<result>'

echo        "<channel>$dsName</channel>"

echo        "<value>"$objItem.Value"</value>"

echo    '</result>'

}

}

}

echo '</prtg>'

Thanks Joakim Lindgren

Created on Jul 12, 2014 11:59:36 AM



Votes:

0

Hi Joakim,

Great Job!
Please keep in mind that it is not a best practice to store the password in cleartext within the script. It is much better to use the arguments for forwarding the host-ip, the username and the password to the script and store these values in PRTG.
For example using parameters for these values you can simplify the usage for several target-machines using the syntax

-host %host -user %windowsuser -password %windowspassword

in sensor-settings -> Parameters.

Kind regards

Created on Jul 15, 2014 11:34:04 AM by  Dieter Loskarn [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.