<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Monitoring View with Nagios in Horizon Documents</title>
    <link>https://communities.vmware.com/t5/Horizon-Documents/Monitoring-View-with-Nagios/ta-p/2775057</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="MsoNormal"&gt;Hi,&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;I thought I'd post this in here as I've searched high and low and found barely any information on this particular topic.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;I've recently deployed Nagios within our company in order to monitor key hosts and services. In doing so this got me thinking how I could use Nagios to monitor certain things within VMware View. Having played around with Exchange PowerShell scripts and Nagios I started to look at VMware PowerCLI. I couldn’t work out a way to pull the information I wanted using the default PowerCLI commands so I started to have a dig around online. During my investigations I then came across the Unofficial VMware View PowerShell cmdlets.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;A href="http://cliffdavies.com/blog/vmware/unofficial-advanced-vmware-view-powershell-cmdlets/"&gt;http://cliffdavies.com/blog/vmware/unofficial-advanced-vmware-view-powershell-cmdlets/&lt;/A&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;Using the above I was able to extract the very information I was after, which I could then run through a script and ultimately report this back to Nagios. So with this in mind I set about writing some scripts for VMware View monitoring.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;Having just experienced a major issue where all 350 View VMs went into an ‘already used’ state, meaning no one could logon, I thought what better place to start than to write a script to count the number of ‘problem desktops’ and then report this back to Nagios for alerting and notification purposes.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;Using Get-Desktops within the unofficial cmdlets I was able to pull out the ‘state’ of each VM Desktop. This is then run through an ‘if’ statement to find ‘problem’ desktops and a count is produced. The count is then compared to the warning and critical levels defined within the script and then the script exits with the relevant code, 0, 1 or 2, to pass this back to Nagios along with the current number of problem desktops.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;The script is executed on the View Connection Server itself using NSClient++ which is initiated by Nagios using a check_nrpe command. There is a great article on telnetport25.com about executing PowerShell scripts using check_nrpe &amp;amp; NSClient++. - &lt;A href="http://www.telnetport25.com/2012/01/installing-nagios-on-ubuntu-server-11-10-then-monitoring-windows-and-exchange-serverspart-3setting-up-basic-exchange-2010-monitoring/"&gt;http://www.telnetport25.com/2012/01/installing-nagios-on-ubuntu-server-11-10-then-monitoring-windows-and-exchange-serverspart-3setting-up-basic-exchange-2010-monitoring/&lt;/A&gt; - In fact I followed the tutorials from that site for my entire Nagios build, they really are great.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;One thing I also had to do was to amend the uadv_vmware_view.psm1 file included with the unofficial cmdlets so that it doesn’t print to screen when a successful connection is made to the View Connection Server. I just amended the ‘if’ statement within the psm1 file to achieve this, pretty simple. I have attached this below too.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;So now I will get alerted by email and visually on our IT monitor when we hit a certain amount of ‘problem’ desktops, which is great as I don’t want to have to check the View Admin console every hour or so.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;If anyone wants any further information please feel free to let me know and I’ll be happy to oblige.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;This also leads me to think what else can be monitored within View using these cmdlets?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This document was generated from the following discussion: &lt;A&gt;javascript:;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jul 2012 17:32:10 GMT</pubDate>
    <dc:creator>mittim12</dc:creator>
    <dc:date>2012-07-05T17:32:10Z</dc:date>
    <item>
      <title>Monitoring View with Nagios</title>
      <link>https://communities.vmware.com/t5/Horizon-Documents/Monitoring-View-with-Nagios/ta-p/2775057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="MsoNormal"&gt;Hi,&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;I thought I'd post this in here as I've searched high and low and found barely any information on this particular topic.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;I've recently deployed Nagios within our company in order to monitor key hosts and services. In doing so this got me thinking how I could use Nagios to monitor certain things within VMware View. Having played around with Exchange PowerShell scripts and Nagios I started to look at VMware PowerCLI. I couldn’t work out a way to pull the information I wanted using the default PowerCLI commands so I started to have a dig around online. During my investigations I then came across the Unofficial VMware View PowerShell cmdlets.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;A href="http://cliffdavies.com/blog/vmware/unofficial-advanced-vmware-view-powershell-cmdlets/"&gt;http://cliffdavies.com/blog/vmware/unofficial-advanced-vmware-view-powershell-cmdlets/&lt;/A&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;Using the above I was able to extract the very information I was after, which I could then run through a script and ultimately report this back to Nagios. So with this in mind I set about writing some scripts for VMware View monitoring.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;Having just experienced a major issue where all 350 View VMs went into an ‘already used’ state, meaning no one could logon, I thought what better place to start than to write a script to count the number of ‘problem desktops’ and then report this back to Nagios for alerting and notification purposes.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;Using Get-Desktops within the unofficial cmdlets I was able to pull out the ‘state’ of each VM Desktop. This is then run through an ‘if’ statement to find ‘problem’ desktops and a count is produced. The count is then compared to the warning and critical levels defined within the script and then the script exits with the relevant code, 0, 1 or 2, to pass this back to Nagios along with the current number of problem desktops.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;The script is executed on the View Connection Server itself using NSClient++ which is initiated by Nagios using a check_nrpe command. There is a great article on telnetport25.com about executing PowerShell scripts using check_nrpe &amp;amp; NSClient++. - &lt;A href="http://www.telnetport25.com/2012/01/installing-nagios-on-ubuntu-server-11-10-then-monitoring-windows-and-exchange-serverspart-3setting-up-basic-exchange-2010-monitoring/"&gt;http://www.telnetport25.com/2012/01/installing-nagios-on-ubuntu-server-11-10-then-monitoring-windows-and-exchange-serverspart-3setting-up-basic-exchange-2010-monitoring/&lt;/A&gt; - In fact I followed the tutorials from that site for my entire Nagios build, they really are great.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;One thing I also had to do was to amend the uadv_vmware_view.psm1 file included with the unofficial cmdlets so that it doesn’t print to screen when a successful connection is made to the View Connection Server. I just amended the ‘if’ statement within the psm1 file to achieve this, pretty simple. I have attached this below too.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;So now I will get alerted by email and visually on our IT monitor when we hit a certain amount of ‘problem’ desktops, which is great as I don’t want to have to check the View Admin console every hour or so.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;If anyone wants any further information please feel free to let me know and I’ll be happy to oblige.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;This also leads me to think what else can be monitored within View using these cmdlets?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This document was generated from the following discussion: &lt;A&gt;javascript:;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 17:32:10 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/Horizon-Documents/Monitoring-View-with-Nagios/ta-p/2775057</guid>
      <dc:creator>mittim12</dc:creator>
      <dc:date>2012-07-05T17:32:10Z</dc:date>
    </item>
  </channel>
</rss>

