<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Uptime &#38; Performance Tips</title>
	<atom:link href="http://blog.monitis.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.monitis.com</link>
	<description>Tips for SysAdmin, Webmaster, Network Admin</description>
	<lastBuildDate>Fri, 03 Feb 2012 10:56:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mongo and Monitis: A NoSQL Dream Come True</title>
		<link>http://blog.monitis.com/index.php/2012/02/03/mongo-and-monitis-a-nosql-dream-come-true/</link>
		<comments>http://blog.monitis.com/index.php/2012/02/03/mongo-and-monitis-a-nosql-dream-come-true/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 10:56:22 +0000</pubDate>
		<dc:creator>Brad Carleton</dc:creator>
				<category><![CDATA[Database Management]]></category>
		<category><![CDATA[Monitoring Scripts]]></category>
		<category><![CDATA[NoSQL Monitoring]]></category>
		<category><![CDATA[big data]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[MongoDB Monitoring]]></category>
		<category><![CDATA[MongoDB performance]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=4794</guid>
		<description><![CDATA[Mongo is a wonderful new NoSql solution from the folks at 10gen, and it has really gained a large following with a reputation for being high performance and developer friendly.  There are lots of good articles on Mongo best practices, see here and here for some examples. We are going to go over a few common [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-4170" style="float: right;" title="mongodb" src="http://blog.monitis.com/wp-content/uploads/2011/10/mongodb.png" alt="" width="300" height="100" /></p>
<div>Mongo is a wonderful new NoSql solution from the folks at 10gen, and it has really gained a large following with a reputation for being high performance and developer friendly.  There are lots of good articles on Mongo best practices, see <a href="http://www.engineyard.com/blog/2011/mongodb-best-practices/">here</a> and <a href="http://blog.mongodb.org/post/4982676520/mongodb-on-ec2-best-practices">here</a> for some examples.</div>
<div></div>
<div>We are going to go over a few common issues that people run into with Mongo, and how <a href="http://www.monitis.com">Monitis</a> can help keep you informed and alert you to potential issues.<span id="more-4794"></span></div>
<div></div>
<div><strong>Too Many Connections</strong></div>
<div>
<p>Connections to a database are good because that means that people are connecting to your database and using your data.  Unfortunately, too many open connections on any of your Mongo databases will take the entire instance down.  Why does this happen?  Well for starters more connections typically means more queries, so it could just be a load issue, which you would want to know about.  On the other hand, a ton of open connections could mean that your Mongo clients are not disconnecting after they are finished asking for data.</p>
<p>Open connections consume resources.  Too many open connections can take down your entire instance even if they are not running any queries.  You should monitor the number of connections with Monitis to make sure that everything is running smoothly.  Load testing should give you an idea of the number of connections to set an alert for.</p>
<p><strong>More Data than RAM</strong></p>
<p>Once, your data set and indexes gets bigger than the amount of RAM available on your instance, then Mongo will start paging to disk.  When this happens performance will start to degrade potentially rapidly as the data set grows.  This might be OK, then again it might be the worst thing ever.</p>
<p>Keeping an eye on the “virtual memory” is the best way to gauge the performance of your Mongo instances.  With, you can monitor this important statistic easily, and you can set up an alert to go off whenever you cross that dreaded RAM threshold whether it’s 4GB or 32GB. Monitis</p>
<p><strong>Timeouts: A Database’s Worst Enemy</strong></p>
<p>Your Mongo queries should not timeout, period.  With a custom Monitis Monitor reading the HTTP Console you can find out if your database is throwing timeouts.  If it is, then you should investigate.  It might just be a bad query or two that needs to be better optimized.  In which case you can scold the developers for poor database practices.  However, cursor timeouts might also indicate that you are overloading your instance, and it might be time to either scale up or out.</p>
<p>At this point, you should have a good idea about how and what to monitor on your Mongo instances, and how to use a great service like Monitis to help.</p>
<p>See also <a title="Permanent Link to Monitoring Performance on MongoDB – Mongo Basics" href="http://blog.monitis.com/index.php/2011/10/24/monitoring-performance-on-mongodb-mongo-basics/" rel="bookmark">Monitoring Performance on MongoDB – Mongo Basics</a></p>
<p><strong>Open source code located at github - <a href="https://github.com/monitisexchange/Monitis-Linux-Scripts">Monitis-Linux-Scripts</a></strong> / <a href="https://github.com/monitisexchange/Monitis-Linux-Scripts/tree/master/mongo">Mongo Monitoring Scripts</a></p>
</div>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F03%2Fmongo-and-monitis-a-nosql-dream-come-true%2F&amp;title=Mongo%20and%20Monitis%3A%20A%20NoSQL%20Dream%20Come%20True&amp;notes=%0D%0AMongo%20is%20a%20wonderful%20new%20NoSql%20solution%20from%20the%20folks%20at%2010gen%2C%20and%20it%20has%20really%20gained%20a%20large%20following%20with%20a%20reputation%20for%20being%20high%20performance%20and%20developer%20friendly.%20%C2%A0There%20are%20lots%20of%20good%20articles%20on%20Mongo%20best%20practices%2C%20see%20here%20and" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F03%2Fmongo-and-monitis-a-nosql-dream-come-true%2F&amp;title=Mongo%20and%20Monitis%3A%20A%20NoSQL%20Dream%20Come%20True&amp;bodytext=%0D%0AMongo%20is%20a%20wonderful%20new%20NoSql%20solution%20from%20the%20folks%20at%2010gen%2C%20and%20it%20has%20really%20gained%20a%20large%20following%20with%20a%20reputation%20for%20being%20high%20performance%20and%20developer%20friendly.%20%C2%A0There%20are%20lots%20of%20good%20articles%20on%20Mongo%20best%20practices%2C%20see%20here%20and" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F03%2Fmongo-and-monitis-a-nosql-dream-come-true%2F&amp;t=Mongo%20and%20Monitis%3A%20A%20NoSQL%20Dream%20Come%20True" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F03%2Fmongo-and-monitis-a-nosql-dream-come-true%2F&amp;title=Mongo%20and%20Monitis%3A%20A%20NoSQL%20Dream%20Come%20True&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=%0D%0AMongo%20is%20a%20wonderful%20new%20NoSql%20solution%20from%20the%20folks%20at%2010gen%2C%20and%20it%20has%20really%20gained%20a%20large%20following%20with%20a%20reputation%20for%20being%20high%20performance%20and%20developer%20friendly.%20%C2%A0There%20are%20lots%20of%20good%20articles%20on%20Mongo%20best%20practices%2C%20see%20here%20and" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F03%2Fmongo-and-monitis-a-nosql-dream-come-true%2F&amp;Title=Mongo%20and%20Monitis%3A%20A%20NoSQL%20Dream%20Come%20True" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F03%2Fmongo-and-monitis-a-nosql-dream-come-true%2F&amp;title=Mongo%20and%20Monitis%3A%20A%20NoSQL%20Dream%20Come%20True" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F03%2Fmongo-and-monitis-a-nosql-dream-come-true%2F&amp;title=Mongo%20and%20Monitis%3A%20A%20NoSQL%20Dream%20Come%20True&amp;annotation=%0D%0AMongo%20is%20a%20wonderful%20new%20NoSql%20solution%20from%20the%20folks%20at%2010gen%2C%20and%20it%20has%20really%20gained%20a%20large%20following%20with%20a%20reputation%20for%20being%20high%20performance%20and%20developer%20friendly.%20%C2%A0There%20are%20lots%20of%20good%20articles%20on%20Mongo%20best%20practices%2C%20see%20here%20and" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F03%2Fmongo-and-monitis-a-nosql-dream-come-true%2F&amp;title=Mongo%20and%20Monitis%3A%20A%20NoSQL%20Dream%20Come%20True" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F03%2Fmongo-and-monitis-a-nosql-dream-come-true%2F&amp;title=Mongo%20and%20Monitis%3A%20A%20NoSQL%20Dream%20Come%20True" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=Mongo%20and%20Monitis%3A%20A%20NoSQL%20Dream%20Come%20True%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F03%2Fmongo-and-monitis-a-nosql-dream-come-true%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/02/03/mongo-and-monitis-a-nosql-dream-come-true/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VDI on Windows Server 2008 R2 Hyper-V: Performance Monitoring Explained&#8211;Part 2</title>
		<link>http://blog.monitis.com/index.php/2012/02/02/vdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-2/</link>
		<comments>http://blog.monitis.com/index.php/2012/02/02/vdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-2/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 09:07:11 +0000</pubDate>
		<dc:creator>Ard-Jan Barnas</dc:creator>
				<category><![CDATA[Monitoring Scripts]]></category>
		<category><![CDATA[Virtual Servers]]></category>
		<category><![CDATA[Windows Servers Monitoring]]></category>
		<category><![CDATA[hyper-v]]></category>
		<category><![CDATA[VDI]]></category>
		<category><![CDATA[virtual desktop interface]]></category>
		<category><![CDATA[virtual machines]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=5106</guid>
		<description><![CDATA[In this second part of our monitoring Hyper-V article we’ll discuss the details about Processor, Memory, and Storage monitoring. In part 1 we discussed the Overall Health metric set. Let’s start with the Processor Metrics. Processor Metrics There are three processor-related metric sets: Hyper-V Hypervisor Logical Processor Hyper-V Hypervisor Root Virtual Processor Hyper-V Hypervisor Virtual [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-2646 alignnone" style="margin: 15px; float: right;" title="logo-hyperv-server08-R2" src="http://blog.monitis.com/wp-content/uploads/2011/07/logo-hyperv-server08-R2.png" alt="hyperv" width="250" /><span style="font-size: small;">In this second part of our <a href="http://blog.monitis.com/index.php/2012/01/30/vdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-1/">monitoring Hyper-V article </a>we’ll discuss the details about Processor, Memory, and Storage monitoring. In part 1 we discussed the Overall Health metric set. Let’s start with the Processor Metrics. </span></p>
<h3><strong>Processor Metrics</strong></h3>
<p>There are three processor-related metric sets:<span id="more-5106"></span></p>
<ul>
<li>Hyper-V Hypervisor Logical Processor</li>
<li>Hyper-V Hypervisor Root Virtual Processor</li>
<li>Hyper-V Hypervisor Virtual Processor</li>
</ul>
<p>The most important counter set you want to monitor is the <strong><em>Hyper-V Hypervisor Logical</em></strong> <strong><em>Processor</em></strong>. This counter set allows you to determine how much of the physical processor is being used. The <strong><em>Virtual Processor</em></strong> counter set only shows part of the <strong><em>Hyper-V Hypervisor Logical Processor</em></strong>, so you want to make sure to use the Logical Processor counter set. The most useful counters in this counter set are the following;</p>
<ul>
<li>%Guest Run</li>
<li>%Hypervisor Run Time</li>
<li>%Idle Run Time</li>
<li>%Total Run Time</li>
</ul>
<p>Note that there is one logical processor in Hyper-V that that has a larger workload than the other logical processors and that is LP0. This Logical Processor is where all interrupts in the system are directed to. If this LP hits 100% utilization there is likely an I/O bottleneck.</p>
<p>The <strong><em>Hyper-V Hypervisor Root Virtual Processor</em></strong> and <strong><em>Hyper-V Hypervisor Virtual Processor</em></strong><em> </em>are just slices of the Logical Processor counter and can help you understand how much total CPU the root and guests are using on the system.</p>
<p>If you want to monitor the root CPU you should use the <strong><em>Processor</em></strong> counter set. According to Microsoft this counter suffers from some skew, but is useful because it gives an idea of how busy the root is. This is important because the root is involved in all I/O, meaning if the root CPU’s are saturated your whole system is likely saturated. In general you want to see the root CPU lower than 10% utilization and over 50% might indicate an issue.</p>
<p>&nbsp;</p>
<h3><strong>Memory Counters</strong></h3>
<p>The following are the counter sets you want to monitor;</p>
<ul>
<li>Hyper-V Hypervisor Partition</li>
<li>Hyper-V Hypervisor Root Partition</li>
<li>Hyper-V VM Vid Partition</li>
<li>Memory</li>
</ul>
<p>The <strong><em>Hyper-v [Root] Partition</em></strong> counters determine how much memory the Hypervisor is managing and using on behalf of a VM which includes the guest address space but not all the memory in the worker process and VID partition. The <strong><em>Hyper-V Hypervisor [ROOT] Partition</em></strong> counter set indicates in the <strong><em>1G GPA Pages </em></strong>and <strong><em>2M GPA Pages</em></strong> metric whether or not a VM is using large memory pages which improves overall VM performance.</p>
<p>The <strong><em>Hyper-V VM Vid Partition </em></strong>counters account for the guest address space and any additional memory the VID needs to manage the VM.</p>
<p>The <strong><em>Memory</em></strong> counters are not specific to any VM and can be used to measure memory used to service I/O on behalf of a virtual machine.</p>
<p>The <strong><em>Partition Counter</em></strong> set also indicates in the <strong><em>Deposited Pages</em></strong> metric how much memory the hypervisor is using for managing the VM. The last counter that is interesting in the partition counter set is the <strong><em>Virtual Processors</em></strong> counter which tells you how many Virtual Processors a VM is configured to use.</p>
<p>The <strong><em>Hyper-V VM Vid Partition</em></strong> counters have two counters that you want to monitor. The <strong><em>Physical Pages Allocated</em></strong> is the total number of guest pages and VID pages needed to manage the VM. The <strong><em>Remote Physical Pages</em></strong> let you know on NUMA based systems if a VM is spanning multiple nodes. Note that Microsoft does not recommend such a configuration.</p>
<p>The <strong><em>Memory</em></strong> counter set allows you to monitor how much memory is consumed in the root. The root is responsible for managing all memory in Hyper-V. When a VM starts you will see the <strong><em>Available Bytes</em></strong> go down by at least the amount of memory given to the guest plus around another 16 &#8211; 64MB for guests meta data structures.</p>
<p>The following counters are useful to monitor:</p>
<ul>
<li><strong><em>Available Bytes</em></strong> – Returns how much memory is remaining for guests.</li>
<li><strong><em>Pages / Sec</em></strong> – Measures memory pressure. This metric can tell you if processes are competing with each other for physical RAM.</li>
</ul>
<h3></h3>
<h3><span>Network Counters</span></h3>
<p>You can use the network counters to monitor overall networking performance on the system. The most important thing to monitor is the total throughput counters to make sure the NICs are not getting saturated. There are four relevant counter sets:</p>
<ul>
<li>Network Interface</li>
<li>Hyper-V Virtual Switch</li>
<li>Hyper-V Legacy Network Adapter</li>
<li>Hyper-V Virtual Network Adapter</li>
</ul>
<p>The <strong><em>Network Interface </em></strong>measures the overall performance of physical device whereas the other counter sets represent the activity of the virtual switches and network adapters in the virtual machines. For the <strong><em>Network Interface</em></strong> the following are the most important counters to monitor:</p>
<ul>
<li>Bytes Total / Sec</li>
<li>Offloaded Connections</li>
<li>Packets / Sec</li>
<li>Packets Outbound Errors</li>
<li>Packets Receive Errors</li>
</ul>
<p>The <strong><em>Hyper-V Virtual Switch</em></strong> counters are good to monitor because depending on your configured network, traffic might only exist on the virtual switch. This is the case with network traffic between guest to guest. The most important counters are:</p>
<ul>
<li>Bytes/Sec</li>
<li>Packets/Sec</li>
</ul>
<p>The <strong><em>Hyper-V Virtual Network Adapter</em></strong> and the <strong><em>Hyper-V Legacy Network Adapter</em></strong><em> </em>counter sets allow you to measure performance of a virtual machine. These counter sets are named with the friendly name of the VM plus the name of the network adapter followed by two GUIDs. The GUIDs are the internal id of the VM and adapter.</p>
<p>If you assign a <em>Legacy Network Adapter</em> to a VM then the counter set to use is the <strong><em>Hyper-V Legacy Network Adapter</em></strong>. In general you should not use this network adapter type because it is not enlightened (see our prior ‘Best Practices’ article). It creates a lot of CPU load in the root, and is slower than the <em>Virtual</em> <em>Network Adapter.</em> However, you need the <em>Legacy Network Adapter </em>to get a VM working before installing Integration Services. Once your VM is working with Integration Services you should use the <em>Network Adapter</em> and the “<strong><em>Hyper-V Virtual Network Adapter”</em></strong> counter set. Note that both Windows Server 2008 and Windows Server 2008 R2 have integration Services pre-installed.</p>
<p>The <strong><em>Hyper-V Legacy Network Adapter</em></strong> counters to monitor are:</p>
<ul>
<li>Bytes Dropped</li>
<li>Bytes Sent / Sec</li>
<li>Bytes Received / Sec</li>
</ul>
<p>In the <strong><em>Hyper-V Virtual Network Adapter</em></strong> you should monitor;</p>
<ul>
<li>Bytes / Sec</li>
<li>Packets / Sec</li>
</ul>
<h3></h3>
<h3><span>Storage Counters</span></h3>
<p>The storage counters are used to monitor overall disk performance on the system and each VM. There are:</p>
<ul>
<li>Physical Disk</li>
<li>Hyper-V Virtual Storage Device</li>
<li>Hyper-V Virtual IDE Controller</li>
</ul>
<p>The <strong><em>Physical </em><em>Disk</em> </strong>counter<strong> </strong>set will give overall storage performance on the system. The other two metrics are for VM’s only. Of the <strong><em>Physical Disk</em></strong> counter set there are three metrics that are useful to monitor. The <strong><em>Current Disk Queue Length</em></strong> measures how busy the drives are. This counter should be around two per drive, depending on your drive configuration. A queue length of 32 might indicate this disk is the bottleneck in your system.</p>
<p>Another useful counter is the <strong><em>Disk Bytes / Sec.</em></strong> You can typically expect to see about 10MB/sec per drive; a safe number for most drives. For random workloads, look at the counter <strong><em>Disk Transfers/Sec. </em></strong>Expect to see about 100 I/O’s per second (IOPs) for each drive. There are drives that can do much better, like 180 IOPs and some that perform worse.</p>
<p>Because of the way storage works in Hyper-V, there are two Hyper-V storage counter sets. Hyper-V provides two virtual storage buses for virtual machines. One IDE and one SCSI. The Virtual IDE counters show up in the <strong><em>Hyper-V Virtual IDE Controller</em></strong> counter set, unless the Integration Services are loaded. In that case you’ll see the activity for both virtual IDE and SCSI in the <strong><em>Hyper-V Virtual Storage Device </em></strong>counter set. If you don’t have integration services installed, only the <strong><em>Hyper-V Virtual IDE Controller</em></strong> will show the VM disk activity.</p>
<p>It wouldn’t hurt to monitor all the counters of both <strong><em>Hyper-V Virtual IDE Controller</em></strong> and <strong><em>Hyper-V Virtual Storage Device.</em></strong> Below are the basic metrics for these two counter sets:</p>
<p>For <strong><em>Hyper-V Virtual IDE Controller</em></strong> there are:</p>
<ul>
<li>Read Bytes / Sec</li>
<li>Write Bytes / Sec</li>
<li>Read Sectors / Sec</li>
<li>Write Sectors / Sec</li>
</ul>
<p>For <strong><em>Hyper-V Virtual Storage Device </em></strong>there are:</p>
<ul>
<li>Error Count</li>
<li>Flush Count</li>
<li>Read Bytes / Sec</li>
<li>Write Bytes / Sec</li>
<li>Read Count</li>
<li>Write Count</li>
</ul>
<p>That’s it for our discussion about the Hyper-V metrics that can be used to help you understand what the system is doing. In the table below, we’ll list all the counters:</p>
<ul>
<li>\Hyper-V Virtual Machine Health Summary \*</li>
<li>\Hyper-V Hypervisor\*</li>
<li>\Processor(_Total)\*</li>
<li>\Hyper-V Hypervisor Logical Processor(*)\%Guest Run</li>
<li>\Hyper-V Hypervisor Logical Processor(*)\%Hypervisor Run Time</li>
<li>\Hyper-V Hypervisor Logical Processor(*)\%Idle Run Time</li>
<li>\Hyper-V Hypervisor Logical Processor(*)\%Total Run Time</li>
<li>\Hyper-V Hypervisor Root Virtual Processor (*)\%Guest Run</li>
<li>\Hyper-V Hypervisor Root Virtual Processor (*)\%Hypervisor Run Time</li>
<li>\Hyper-V Hypervisor Root Virtual Processor (*)\%Idle Run Time</li>
<li>\Hyper-V Hypervisor Root Virtual Processor (*)\%Total Run Time</li>
<li>\Hyper-V Hypervisor Virtual Processor (_Total)\*</li>
<li>\Memory\Pages / Sec</li>
<li>\Memory\Available Bytes</li>
<li>\Hyper-V Hypervisor Partition(*)\2M GPA Pages</li>
<li>\Hyper-V Hypervisor Partition(*)\Deposited Pages</li>
<li>\Hyper-V Hypervisor Partition(*)\Virtual Processors</li>
<li>\Hyper-V Hypervisor Root Partition(*)\*</li>
<li>\Hyper-V VM Vid Partition(*)\Physical Pages Allocated</li>
<li>\Hyper-V VM Vid Partition(*)\Remote Physical Pages</li>
<li>\Network Interface(*)\*</li>
<li>\Hyper-V Virtual Switch(*)\*</li>
<li>\Hyper-V Legacy Network Adapter(*)\*</li>
<li>\Hyper-V Virtual Network Adapter(*)\*</li>
<li>\Physical Disk(*)\Current Disk Queue Length</li>
<li>\Physical Disk(*)\Disk Bytes / sec</li>
<li>\Physical Disk(*)\Disk Transfers/sec</li>
<li>\Hyper-V Virtual Storage Device(*)\*</li>
<li>\Hyper-V Virtual IDE Controller(*)\*</li>
</ul>
<p><em>(_Total) means only the total should be collected.</em></p>
<p><em>(*) means collect all counters. </em></p>
<p><em>\* means collect all the counters in the counter set. </em></p>
<p><em>\&lt;name&gt; means only collect that counter. </em></p>
<h3></h3>
<h3><span>Custom Monitor</span></h3>
<p>We have provided a custom monitor in VBScript that uses remote WMI and the available performance counters. The most important counters that we discussed in this article are included in this monitor. You can download this script from <a href="https://github.com/monitisexchange/Windows-Monitoring-Scripts">GitHub</a>.</p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F02%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-2%2F&amp;title=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%202&amp;notes=In%20this%20second%20part%20of%20our%20monitoring%20Hyper-V%20article%20we%E2%80%99ll%20discuss%20the%20details%20about%20Processor%2C%20Memory%2C%20and%20Storage%20monitoring.%20In%20part%201%20we%20discussed%20the%20Overall%20Health%20metric%20set.%20Let%E2%80%99s%20start%20with%20the%20Processor%20Metrics.%20%0D%0AProcessor%20Metrics%0D%0ATh" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F02%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-2%2F&amp;title=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%202&amp;bodytext=In%20this%20second%20part%20of%20our%20monitoring%20Hyper-V%20article%20we%E2%80%99ll%20discuss%20the%20details%20about%20Processor%2C%20Memory%2C%20and%20Storage%20monitoring.%20In%20part%201%20we%20discussed%20the%20Overall%20Health%20metric%20set.%20Let%E2%80%99s%20start%20with%20the%20Processor%20Metrics.%20%0D%0AProcessor%20Metrics%0D%0ATh" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F02%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-2%2F&amp;t=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%202" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F02%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-2%2F&amp;title=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%202&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=In%20this%20second%20part%20of%20our%20monitoring%20Hyper-V%20article%20we%E2%80%99ll%20discuss%20the%20details%20about%20Processor%2C%20Memory%2C%20and%20Storage%20monitoring.%20In%20part%201%20we%20discussed%20the%20Overall%20Health%20metric%20set.%20Let%E2%80%99s%20start%20with%20the%20Processor%20Metrics.%20%0D%0AProcessor%20Metrics%0D%0ATh" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F02%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-2%2F&amp;Title=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%202" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F02%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-2%2F&amp;title=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%202" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F02%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-2%2F&amp;title=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%202&amp;annotation=In%20this%20second%20part%20of%20our%20monitoring%20Hyper-V%20article%20we%E2%80%99ll%20discuss%20the%20details%20about%20Processor%2C%20Memory%2C%20and%20Storage%20monitoring.%20In%20part%201%20we%20discussed%20the%20Overall%20Health%20metric%20set.%20Let%E2%80%99s%20start%20with%20the%20Processor%20Metrics.%20%0D%0AProcessor%20Metrics%0D%0ATh" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F02%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-2%2F&amp;title=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%202" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F02%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-2%2F&amp;title=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%202" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%202%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F02%2F02%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-2%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/02/02/vdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitor Everything with Monitis &#8211; And do it easily with PowerShell &#8211; Part 14 (Final)</title>
		<link>http://blog.monitis.com/index.php/2012/01/31/monitor-everything-with-monitis-and-do-it-easily-with-powershell-part-14-final/</link>
		<comments>http://blog.monitis.com/index.php/2012/01/31/monitor-everything-with-monitis-and-do-it-easily-with-powershell-part-14-final/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 20:20:44 +0000</pubDate>
		<dc:creator>Hovhannes Avoyan</dc:creator>
				<category><![CDATA[Monitoring Scripts]]></category>
		<category><![CDATA[Windows Servers Monitoring]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[task scheduler]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=5310</guid>
		<description><![CDATA[Scheduling Custom Monitors with Monitis and PowerShell In last article, we talked about creating custom monitor updater commands that would run a script and upload the values to Monitis.  These custom updaters make it a snap to convert any PowerShell script to a Monitis monitor.  Simply plug the script in and start using it’s more [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-3383" style="float: right;" title="powershell" src="http://blog.monitis.com/wp-content/uploads/2011/08/pshell.jpeg" alt="" width="204" height="204" /></p>
<h3>Scheduling Custom Monitors with Monitis and PowerShell</h3>
<p>In last article, we talked about creating custom monitor updater commands that would run a script and upload the values to Monitis.  These custom updaters make it a snap to convert any PowerShell script to a Monitis monitor.  Simply plug the script in and start using it’s more logical name: Update-YourMonitor.<span id="more-5310"></span></p>
<pre>Add-MonitisCustomMonitorUpdater -Name OutOfPaper -ScriptBlock {
    Get-Counter "\Print Queue(*)\Out of Paper Errors" |
        Select-Object -ExpandProperty CounterSamples |
        Where-Object { $_.InstanceName -ne '_total' -and $_.CookedValue -gt 0} |
        Select-Object @{
            Label = "Printer"
            Expression={$_.InstanceName}
        }, @{
            Label = "OutOfPaperErrors"
            Expression={$_.CookedValue}
        }
} -Property Printer, OutOfPaperErrors</pre>
<p>&nbsp;</p>
<p>Once you’ve run this code, you can simply do:</p>
<pre>Import-Module Monitis
Update-MonitisOutOfPaper</pre>
<p>To update the values.</p>
<p>You can simply schedule the update by scheduling the two lines.  To click thru it, run TaskSched.msc, then create a new task.  Run PowerShell.exe as the task, and use the arguments –command Import-Module Monitis;Update-MonitisOutOfPaper.</p>
<p>You can also schedule the task using a script, but not one built into the box.</p>
<p>All throughout this article series, you’ve been focused on using the Monitis module and in-the-box capabilities of Powershell, but there are hundreds of community modules to choose from.  You can easily leverage these community modules in your own custom monitors.</p>
<p>In one very large collection of these modules, called the PowerShellPack (<a href="http://code.msdn.microsoft.com/PowerShellPack">http://code.msdn.microsoft.com/PowerShellPack</a>), there is a task scheduler module you can use to schedule the monitor.</p>
<p>Like every command in PowerShell and every command in the monitis module, you can find out about the commands in this module with Get-Command and Get-Help.</p>
<p>If you want to schedule a task that runs your custom monitor with this module, it will look something like this:</p>
<pre>New-Task |
    Add-TaskTrigger -OnBoot -Repeat "0:0:10" |
    Add-TaskAction -Script {
        Import-Module Monitis
        Update-OutOfPaper
    } |
    Register-ScheduledTask -name "CheckForOutOfPaper" -Credential (Get-Credential)</pre>
<p>Register-ScheduledTask -name &#8220;CheckForOutOfPaper&#8221; -Credential (Get-Credential)</p>
<p>New task creates a new task</p>
<p>Add-TaskTrigger gives it a new trigger, on boot and repeating every 10 minutes thereafter.</p>
<p>Add-TaskAction runs the monitor, importing the module and running Update-OutOfPapeer.</p>
<p>Register-ScheduledTask registers the task, and –Credential registers the credential the task will be run under.</p>
<p>That’s it.  Now you can create a monitor to hold any piece of information, collect that information with PowerShell, and update it on a regular basis.  Thanks to your notification rule, your printer lackey will automatically head off to keep your printers filled, and you can monitor your friends Facebook updates while Monitis and PowerShell monitor your data center.</p>
<p>Monitis is an incredible monitoring platform with the flexibility to monitor whatever you want.  PowerShell is an incredible task management and automation platform that can do anything you need it to.  Together, you truly can Monitis anything with Monitis.</p>
<p>See also:</p>
<p><a title="Permanent Link to Monitor Everything with Monitis – And do it easily with PowerShell – Part 1" href="http://blog.monitis.com/index.php/2011/09/19/monitor-everything-with-monitis-and-do-it-easily-with-powershell-part-1/" rel="bookmark">Monitor Everything with Monitis – And do it easily with PowerShell – Part 1</a></p>
<p><a title="Permanent Link to Monitor Everything with Monitis – And do it easily with PowerShell – Part 2" href="http://blog.monitis.com/index.php/2011/09/22/monitor-everything-with-monitis-and-do-it-easily-with-powershell-part-2/" rel="bookmark">Part 2: Managing External Monitors with Monitis and PowerShell</a></p>
<p><a title="Permanent Link to Monitor Everything with Monitis – And do it easily with PowerShell – Part 3" href="http://blog.monitis.com/index.php/2011/09/29/monitor-everything-with-monitis-and-do-it-easily-with-powershell-part3/" rel="bookmark">Part 3: Mining External Monitor Results with Monitis and PowerShell</a></p>
<p><a title="Permanent Link to Monitor Everything with Monitis – And do it easily with PowerShell – Part 4" href="http://blog.monitis.com/index.php/2011/10/04/monitor-everything-with-monitis-and-do-it-easily-with-powershell-part-4/" rel="bookmark">Part 4: Monitoring Web Applications with Monitis</a></p>
<p><a title="Permanent Link to Monitor Everything with Monitis – And do it easily with PowerShell – Part 5" href="http://blog.monitis.com/index.php/2011/10/10/monitor-everything-with-monitis-and-do-it-easily-with-powershell-part-5/" rel="bookmark">Part 5: Testing Web Content with Monitis, Excel, and PowerShell</a></p>
<p><a title="Permanent Link to Monitor Everything with Monitis – And do it easily with PowerShell – Part 6" href="http://blog.monitis.com/index.php/2011/10/11/monitor-everything-with-monitis-and-do-it-easily-with-powershell-part-6/" rel="bookmark">Part 6: Monitoring Anything with a Custom Monitor</a></p>
<p><a title="Permanent Link to Monitor Everything with Monitis – And do it easily with PowerShell – Part 7" href="http://blog.monitis.com/index.php/2011/10/14/monitor-everything-with-monitis-and-do-it-easily-with-powershell-part-7/" rel="bookmark">Part 7:  Hardware Inventory with Monitis Custom Monitors</a></p>
<p><a title="Permanent Link to Monitor Everything with Monitis – And do it easily with PowerShell – Part 8" href="http://blog.monitis.com/index.php/2011/10/31/monitor-everything-with-monitis-and-do-it-easily-with-powershell-part-8-2/" rel="bookmark">Part 8: Monitoring Logons with Monitis</a></p>
<p><a title="Permanent Link to Monitor Everything with Monitis – And do it easily with PowerShell – Part 9" href="http://blog.monitis.com/index.php/2011/11/02/monitor-everything-with-monitis-and-do-it-easily-with-powershell-part-9/" rel="bookmark">Part 9: Monitoring Connections to Shared Folders with Monitis and Custom Monitors</a></p>
<p><a title="Permanent Link to Monitor Everything with Monitis – And do it easily with PowerShell – Part 10" href="http://blog.monitis.com/index.php/2011/11/17/monitor-everything-with-monitis-and-do-it-easily-with-powershell-part-10/" rel="bookmark">Part 10: Inventory Windows Installations with Monitis and PowerShell</a></p>
<p><a title="Permanent Link to Monitor Everything with Monitis – And do it easily with PowerShell – Part 11" href="http://blog.monitis.com/index.php/2011/12/08/monitis-with-powershell-part-10-2/" rel="bookmark">Part 11: Monitoring Removable Disks on Many Computers with Monitis and PowerShell</a></p>
<p><a title="Permanent Link to Monitor Everything with Monitis – And do it easily with PowerShell – Part 12" href="http://blog.monitis.com/index.php/2011/12/13/monitor-everything-with-monitis-and-do-it-easily-with-powershell-part-12/" rel="bookmark">Part 12: Monitoring Event Logs and Using Monitis Notifications</a></p>
<p><a title="Permanent Link to Monitor Everything with Monitis – And do it easily with PowerShell – Part 13" href="http://blog.monitis.com/index.php/2012/01/17/monitor-everything-with-monitis-and-do-it-easily-with-powershell-part-13/" rel="bookmark">Part 13: Monitoring out of Paper with Monitis (Printer Monitoring)</a></p>
<p><a title="Permanent Link to Monitor Everything with Monitis – And do it easily with PowerShell – Part 13" href="http://blog.monitis.com/index.php/2012/01/17/monitor-everything-with-monitis-and-do-it-easily-with-powershell-part-13/" rel="bookmark"> </a></p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fmonitor-everything-with-monitis-and-do-it-easily-with-powershell-part-14-final%2F&amp;title=Monitor%20Everything%20with%20Monitis%20-%20And%20do%20it%20easily%20with%20PowerShell%20-%20Part%2014%20%28Final%29&amp;notes=%0D%0AScheduling%20Custom%20Monitors%20with%20Monitis%20and%20PowerShell%0D%0AIn%20last%20article%2C%20we%20talked%20about%20creating%20custom%20monitor%20updater%20commands%20that%20would%20run%20a%20script%20and%20upload%20the%20values%20to%20Monitis.%C2%A0%20These%20custom%20updaters%20make%20it%20a%20snap%20to%20convert%20any%20PowerS" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fmonitor-everything-with-monitis-and-do-it-easily-with-powershell-part-14-final%2F&amp;title=Monitor%20Everything%20with%20Monitis%20-%20And%20do%20it%20easily%20with%20PowerShell%20-%20Part%2014%20%28Final%29&amp;bodytext=%0D%0AScheduling%20Custom%20Monitors%20with%20Monitis%20and%20PowerShell%0D%0AIn%20last%20article%2C%20we%20talked%20about%20creating%20custom%20monitor%20updater%20commands%20that%20would%20run%20a%20script%20and%20upload%20the%20values%20to%20Monitis.%C2%A0%20These%20custom%20updaters%20make%20it%20a%20snap%20to%20convert%20any%20PowerS" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fmonitor-everything-with-monitis-and-do-it-easily-with-powershell-part-14-final%2F&amp;t=Monitor%20Everything%20with%20Monitis%20-%20And%20do%20it%20easily%20with%20PowerShell%20-%20Part%2014%20%28Final%29" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fmonitor-everything-with-monitis-and-do-it-easily-with-powershell-part-14-final%2F&amp;title=Monitor%20Everything%20with%20Monitis%20-%20And%20do%20it%20easily%20with%20PowerShell%20-%20Part%2014%20%28Final%29&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=%0D%0AScheduling%20Custom%20Monitors%20with%20Monitis%20and%20PowerShell%0D%0AIn%20last%20article%2C%20we%20talked%20about%20creating%20custom%20monitor%20updater%20commands%20that%20would%20run%20a%20script%20and%20upload%20the%20values%20to%20Monitis.%C2%A0%20These%20custom%20updaters%20make%20it%20a%20snap%20to%20convert%20any%20PowerS" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fmonitor-everything-with-monitis-and-do-it-easily-with-powershell-part-14-final%2F&amp;Title=Monitor%20Everything%20with%20Monitis%20-%20And%20do%20it%20easily%20with%20PowerShell%20-%20Part%2014%20%28Final%29" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fmonitor-everything-with-monitis-and-do-it-easily-with-powershell-part-14-final%2F&amp;title=Monitor%20Everything%20with%20Monitis%20-%20And%20do%20it%20easily%20with%20PowerShell%20-%20Part%2014%20%28Final%29" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fmonitor-everything-with-monitis-and-do-it-easily-with-powershell-part-14-final%2F&amp;title=Monitor%20Everything%20with%20Monitis%20-%20And%20do%20it%20easily%20with%20PowerShell%20-%20Part%2014%20%28Final%29&amp;annotation=%0D%0AScheduling%20Custom%20Monitors%20with%20Monitis%20and%20PowerShell%0D%0AIn%20last%20article%2C%20we%20talked%20about%20creating%20custom%20monitor%20updater%20commands%20that%20would%20run%20a%20script%20and%20upload%20the%20values%20to%20Monitis.%C2%A0%20These%20custom%20updaters%20make%20it%20a%20snap%20to%20convert%20any%20PowerS" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fmonitor-everything-with-monitis-and-do-it-easily-with-powershell-part-14-final%2F&amp;title=Monitor%20Everything%20with%20Monitis%20-%20And%20do%20it%20easily%20with%20PowerShell%20-%20Part%2014%20%28Final%29" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fmonitor-everything-with-monitis-and-do-it-easily-with-powershell-part-14-final%2F&amp;title=Monitor%20Everything%20with%20Monitis%20-%20And%20do%20it%20easily%20with%20PowerShell%20-%20Part%2014%20%28Final%29" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=Monitor%20Everything%20with%20Monitis%20-%20And%20do%20it%20easily%20with%20PowerShell%20-%20Part%2014%20%28Final%29%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fmonitor-everything-with-monitis-and-do-it-easily-with-powershell-part-14-final%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/01/31/monitor-everything-with-monitis-and-do-it-easily-with-powershell-part-14-final/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>You Can Monitor Your XenServer With Monitis!</title>
		<link>http://blog.monitis.com/index.php/2012/01/31/you-can-monitor-your-xenserver-with-monitis/</link>
		<comments>http://blog.monitis.com/index.php/2012/01/31/you-can-monitor-your-xenserver-with-monitis/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 12:41:50 +0000</pubDate>
		<dc:creator>Wawrzyniec</dc:creator>
				<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[Monitis API]]></category>
		<category><![CDATA[Monitoring Scripts]]></category>
		<category><![CDATA[Server Management]]></category>
		<category><![CDATA[Virtual Servers]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[hypervisor]]></category>
		<category><![CDATA[virtual machines]]></category>
		<category><![CDATA[virtuali]]></category>
		<category><![CDATA[xcp]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xenserver]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=5083</guid>
		<description><![CDATA[As we have discussed on the Monitis blog virtualization is one of the hottest IT subjects today. One leader in this field is Citrix &#8212; with the XenServer product family. XenServer is the most known commercial implementation of of the open source Xen hypervisor. By the way, you should pronounced Xen like “zen.” It comes from [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://citrix.com/xenserver"><img class="alignright" style="margin: 10px; float: right;" src="https://lh3.googleusercontent.com/VFa_cmL73N4fkuC9fRb7yXdHQ1CuRgKCgnHpQ5ENrwsXDDYMFma8Pny3SXl6qEHTbKKRVRAxZYa7dLmLXY7fIU_DP2e2aU5PUkGiDbDy7ZHjTXZYZ4c" alt="Left side (image): Hand crushing computer equpment; Right side (text): XenServer6 Intgrate, manage and automate a virtual datacenter. Learn More" width="250" height="84" /></a></p>
<p>As we have discussed on the Monitis blog <a href="../index.php/tag/virtualization/">virtualization</a> is one of the hottest IT subjects today.</p>
<p>One <a href="http://www.citrix.com/site/resources/dynamic/additional/citirix_magic_quadrant_2011.pdf?ntref=xsmain_promo_gartnerMQ">leader</a> in this field is Citrix &#8212; with the <a href="http://www.citrix.com/English/ps2/products/feature.asp?contentID=2316933">XenServer</a> product family. XenServer is the most known commercial implementation of of the open source <a href="http://xen.org/">Xen</a> hypervisor. By the way, you should pronounced Xen like “zen.” It comes from a Greek word meaning “guest.”</p>
<p><span id="more-5083"></span>In the IT world, Xen originated as a research project, led by Ian Pratt at England’s Cambridge University. It was first developed by XenSource Inc., and after acquisition, the work was continued by Citrix. Currently, you can choose between <a href="http://www.citrix.com/English/ps2/products/subfeature.asp?contentID=2300456">4 editions</a> of XenServer:</p>
<ul>
<li>XenServer [Free Edition]</li>
<li>XenServer Advanced Edition</li>
<li>XenServer Enterprise Edition</li>
<li>XenServer Platinum Edition</li>
</ul>
<p>Other Citrix &#8220;Xen&#8221; technology, like XenApp or XenDesktop, are not related to the original Xen project.</p>
<p>In 2009, Citrix decided to open the source of XenServer, and the company created <a href="http://xen.org/products/cloudxen.html">XCP</a> (Xen Cloud Platform). In the first phase, XCP was a whole Linux distribution. Recently, the initiative has been extended to provide XAPI toolstack on standard Linux distribution, in the first place for Debian and Ubuntu. What this means is that you can try XAPI on your home machine.</p>
<p><strong>Monitoring</strong></p>
<p>In the article below, we’ll learn how to apply daemon exporting XenServer metrics to Monitis. This is only proof of concept, but it can be easily modified to do exactly what you want. (This is the power you get using <a href="http://portal.monitis.com/index.php/products/open-ai">Monitis Open API</a>).</p>
<p><strong><em> XenServer/XCP</em></strong></p>
<p>There is a dedicated XenServer monitoring tool included in all paid editions. You can also find some third-party tools. Obviously, we are interested in how we can monitor XenServer and XCP with Monitis. One possible way is to enable <a href="http://support.citrix.com/article/CTX116187">SNMP</a> on XenServer and treat it as a standard Linux <a href="../index.php/2011/07/08/cacti-snmp-monitis-and-whats-between-them/">in Monitis</a>. After all, XenServer and XCP dom0 are based on CentOS. Another method that we are going to give an overview of today is XenServer/XCP-specific. XenServer enables you to download, host and store all VM statistic in a  <a href="http://oss.oetiker.ch/rrdtool/">RRD</a> (Round Robin Database) using HTTP handler. You can find some information on how to use XenServer RRD data in two documents from the Citrix Community page (Click <a href="http://community.citrix.com/display/xs/XenServer+Software+Development+Kit+Guide#XenServerSoftwareDevelopmentKitGuide-5.1.%26nbsp%3BPersistentXenServerPerformanceStatistics">here</a> and <a href="http://community.citrix.com/display/xs/Using+XenServer+RRDs">here</a>). In the second document, you’ll see that there are two examples of Python scripts that we are going to use for the base to our daemon updating XenServer monitors in Monitis. Both scripts use the python &#8220;rrd_update&#8221; module. You can also find on this on the <a href="http://community.citrix.com/download/attachments/163943399/parse_rrd.py">Citrix page</a> or grab it from <a href="https://github.com/wawrzek/XenRRD">github</a>.</p>
<p><em><strong> Monitis</strong></em></p>
<p>Monitis has dedicated libraries in many programing languages. You need to use python to export XenServer RRD; therefore to update results on Monitis, we are going to use the <a href="../index.php/2011/07/07/custom-monitors-in-monitis-with-python/">python</a> library, too. The code can be obtained from our <a href="https://github.com/monitisexchange/Python-Monitis-Scripts">github</a> repository. Please remember that you need the <a href="http://effbot.org/zone/element-index.htm">elementtree</a> module, which is not a part of standard python distribution. Plus, you have to get it from the official website or obtain it from your distribution repository. There is a note about it in the code, but not in the original article.</p>
<p>&nbsp;</p>
<p><strong>xen2monitis</strong></p>
<p>Having these two weapons, we are now ready to attack. First, there is the example code in our git repository that you can install on XenServer or Linux distribution with XCP. Alternately, you can choose another server with a connection to both Monitis and the XenServer that you want to monitor. However, installing our daemon on XenServer/XCP seems to be the best choice.</p>
<p>Here are some easy directions:</p>
<p>1.) Create the Xen2Monitis default directory:</p>
<pre style="padding-left: 30px; padding-bottom: 1em;">mkdir /var/local/lib/xen2monitis</pre>
<p>2.) Download the xen2monitis code which is part of Monitis-Linux-Scripts:</p>
<pre style="padding-left: 30px; padding-bottom: 1em;">git clone <a href="https://github.com/monitisexchange/Xen2Monitis.git">https://github.com/monitisexchange/Monitis-Linux-Scripts.git</a></pre>
<p>3.) Copy Xen2Monits file to default location:</p>
<pre style="padding-left: 30px; padding-bottom: 1em;">cp  Monitis-Linux-Scripts.git/Xen2Monits/* /var/local/lib/xen2monitis</pre>
<p>4.) Go to created directory:</p>
<pre style="padding-left: 30px; padding-bottom: 1em;">cd /var/local/lib/xen2monitis</pre>
<p>5.) Obtain the elementtree module:<br />
- You can get the source code:</p>
<pre style="padding-left: 30px; padding-bottom: 1em;">wget <a href="http://effbot.org/media/downloads/elementtree-1.2.6-20050316.tar.gz">http://effbot.org/media/downloads/elementtree-1.2.6-20050316.tar.gz</a></pre>
<p>- Or you can get a dedicated package for your distribution. If you plan to use XenServer, the elementtree is already installed there.</p>
<p>6.) Install the elementtree (if not already done by your distribution)<br />
- for source code (the last command as root):</p>
<pre style="padding-left: 30px; padding-bottom: 1em;">tar -xzf elementtree-1.2.6-20050316.tar.gz
cd elementtree-1.2.6-20050316
python setup.py install</pre>
<p>7.) Next, add your API Key and Secret to a file. Please separate them with &#8220;,&#8221;.The default ‘secret file’ is  <em>/usr/local/xen2monitis/secret</em></p>
<p>8.) Add the xenserver root password to your secret file, so it should be similar to:</p>
<pre style="padding-left: 30px; padding-bottom: 1em;">5DQQ0460S18ERNRNRUI7M905N1, 7MA9XJNDL3KAMBAKFR9981N04J, secret_password</pre>
<p>9.) Now you can start the daemon:</p>
<pre style="padding-left: 30px; padding-bottom: 1em;">/usr/local/lib/xen2monitis/xen2monitis.py start</pre>
<p>10.) You need to wait few minutes. You can check if your script works without any problems in <em>/var/log/xs2monitis.log</em>.</p>
<p>11.) After a few minutes, you should have a bunch of new graphs that you can add to the Dashboard by <em>Monitors-&gt;Custom Monitor</em> menu.</p>
<p><em><strong>Monitor Name Conventions</strong></em></p>
<p>When you look at newly created monitor names, you might be a bit confused. The names tend to be very long and have a strange set of strings separated by ‘-’, for example:</p>
<p>lisbon &#8211; cpu1 (HOST: 0c1bb847-d867-75ff-27e0-7b468f1385f2)</p>
<p>Such name conventions were chosen to ensure the uniqueness of each monitor. Imagine that you have two VMs called &#8220;Win7&#8243;. Daemon would not be able to distinguish between them and would save all data into one monitor! To address it, XenServer UUID (universally unique identifier), what looks like set of strings separated by &#8220;-&#8221;, is added to each title.</p>
<p>&nbsp;</p>
<p><strong>Daemon Modification</strong></p>
<p>Using xen2monitis.py script, please remember that there are some values you can define at the beginning of the file, for example:</p>
<ul>
<li>where is the secret file (default <em>/usr/local/lib/xen2monitis/secret</em>)</li>
<li>where is the lock file (default <em>/var/run/xen2monitis.pid</em>)</li>
<li>where is the log file (default<em> /var/log/xen2monitis.log</em>)</li>
<li>the url to pool master (default <em>http://localhost</em>)</li>
</ul>
<p>You might prefer not to use daemon, but, instead, call up script from cron job. It’s not a big problem. You need to copy the main loop, start after line 115 to separate the file and convert it.</p>
<p>We hope this article showing you how to monitor your XenServer with Monitis makes your IT life a lot easier. Please share some tips of your own!</p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fyou-can-monitor-your-xenserver-with-monitis%2F&amp;title=You%20Can%20Monitor%20Your%20XenServer%20With%20Monitis%21&amp;notes=%0D%0A%0D%0AAs%20we%20have%20discussed%20on%20the%20Monitis%20blog%20virtualization%20is%20one%20of%20the%20hottest%20IT%20subjects%20today.%0D%0A%0D%0AOne%C2%A0leader%20in%20this%20field%20is%20Citrix%20--%20with%20the%20XenServer%20product%20family.%20XenServer%20is%20the%20most%20known%20commercial%20implementation%20of%20of%20the%20open%20sou" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fyou-can-monitor-your-xenserver-with-monitis%2F&amp;title=You%20Can%20Monitor%20Your%20XenServer%20With%20Monitis%21&amp;bodytext=%0D%0A%0D%0AAs%20we%20have%20discussed%20on%20the%20Monitis%20blog%20virtualization%20is%20one%20of%20the%20hottest%20IT%20subjects%20today.%0D%0A%0D%0AOne%C2%A0leader%20in%20this%20field%20is%20Citrix%20--%20with%20the%20XenServer%20product%20family.%20XenServer%20is%20the%20most%20known%20commercial%20implementation%20of%20of%20the%20open%20sou" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fyou-can-monitor-your-xenserver-with-monitis%2F&amp;t=You%20Can%20Monitor%20Your%20XenServer%20With%20Monitis%21" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fyou-can-monitor-your-xenserver-with-monitis%2F&amp;title=You%20Can%20Monitor%20Your%20XenServer%20With%20Monitis%21&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=%0D%0A%0D%0AAs%20we%20have%20discussed%20on%20the%20Monitis%20blog%20virtualization%20is%20one%20of%20the%20hottest%20IT%20subjects%20today.%0D%0A%0D%0AOne%C2%A0leader%20in%20this%20field%20is%20Citrix%20--%20with%20the%20XenServer%20product%20family.%20XenServer%20is%20the%20most%20known%20commercial%20implementation%20of%20of%20the%20open%20sou" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fyou-can-monitor-your-xenserver-with-monitis%2F&amp;Title=You%20Can%20Monitor%20Your%20XenServer%20With%20Monitis%21" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fyou-can-monitor-your-xenserver-with-monitis%2F&amp;title=You%20Can%20Monitor%20Your%20XenServer%20With%20Monitis%21" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fyou-can-monitor-your-xenserver-with-monitis%2F&amp;title=You%20Can%20Monitor%20Your%20XenServer%20With%20Monitis%21&amp;annotation=%0D%0A%0D%0AAs%20we%20have%20discussed%20on%20the%20Monitis%20blog%20virtualization%20is%20one%20of%20the%20hottest%20IT%20subjects%20today.%0D%0A%0D%0AOne%C2%A0leader%20in%20this%20field%20is%20Citrix%20--%20with%20the%20XenServer%20product%20family.%20XenServer%20is%20the%20most%20known%20commercial%20implementation%20of%20of%20the%20open%20sou" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fyou-can-monitor-your-xenserver-with-monitis%2F&amp;title=You%20Can%20Monitor%20Your%20XenServer%20With%20Monitis%21" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fyou-can-monitor-your-xenserver-with-monitis%2F&amp;title=You%20Can%20Monitor%20Your%20XenServer%20With%20Monitis%21" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=You%20Can%20Monitor%20Your%20XenServer%20With%20Monitis%21%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F31%2Fyou-can-monitor-your-xenserver-with-monitis%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/01/31/you-can-monitor-your-xenserver-with-monitis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NGINX Best Practices</title>
		<link>http://blog.monitis.com/index.php/2012/01/30/nginx-best-practices/</link>
		<comments>http://blog.monitis.com/index.php/2012/01/30/nginx-best-practices/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 20:18:11 +0000</pubDate>
		<dc:creator>glenn.chen</dc:creator>
				<category><![CDATA[Linux Servers Monitoring]]></category>
		<category><![CDATA[Mac OS Monitoring]]></category>
		<category><![CDATA[Performance Management]]></category>
		<category><![CDATA[Server Management]]></category>
		<category><![CDATA[Nginx]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=5163</guid>
		<description><![CDATA[&#160; Need for Speed? With its first public release in 2004, NGINX now is the second most used web server in the world. This is quite impressive considering NGINX was born among several big players including Apache, Microsoft IIS, and other popular web server software. By sharing best practices and a few tips today, we [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p><strong>Need for Speed?<a href="http://blog.monitis.com/wp-content/uploads/2012/01/nginx_logo.jpeg"><img class="alignright size-full wp-image-5252" style="float: right;" src="http://blog.monitis.com/wp-content/uploads/2012/01/nginx_logo.jpeg" alt="" width="250" /></a></strong></p>
<p>With its first public release in 2004, NGINX now is the <a href="http://wiki.nginx.org/Main" target="_blank">second most used web server in the world</a>. This is quite impressive considering NGINX was born among several big players including Apache, Microsoft IIS, and other popular <a href="http://en.wikipedia.org/wiki/Comparison_of_web_server_software" target="_blank">web server software</a>. By sharing best practices and a few tips today, we would like to bring NGINX&#8217;s new blood up to speed. Even if you come from the Apache world, you will learn how to build an Apache server that married NGINX, an extremely fast and high-performance web server. Let&#8217;s go:<span id="more-5163"></span></p>
<ol>
<li><strong>Make sure your OS is well supported by NGINX:</strong><br />
In particular, double-check NGINX supports the event polling system call under your operating system. This is important because the beauty of NGINX is its asynchronous architecture for event handling. (This design is used to address the <a href="http://en.wikipedia.org/wiki/C10k_problem" target="_blank">C10k problem</a>, literally, to handle 10,000 clients simultaneously.) Under Windows, however, NGINX uses select() for event polling. While select() is non-blocking, select() can limit a process to have only 1024 open file descriptors. Therefore if you expect your NGINX server to be high-performance, Windows might not be your best environment to work with.</li>
<li><strong>Improve</strong><strong> disk I/O if possible</strong>:<a href="http://blog.monitis.com/wp-content/uploads/2012/01/disk1.png"><img class="alignright size-full wp-image-5250" src="http://blog.monitis.com/wp-content/uploads/2012/01/disk1.png" alt="" width="150" height="139" /></a>
<ul>
<li>You can turn off NGINX access logs and use the client site scripts such as <a href="http://www.google.com/analytics/" target="_blank">Google Analytics</a> to collect statistics. This way NGINX will not record every single request to your log file, reducing disk I/O significantly. It is not recommended you also turn off the error logs. After all, errors are important information, and they don&#8217;t occur that often anyway.</li>
<li>Configure <a href="http://wiki.nginx.org/HttpCoreModule#open_file_cache" target="_blank">&#8220;open file cache&#8221;</a> if your system supports it. Note that the actual file is not cached, but the pointer to the file instead. That is, an inode in your filesystem. Why cachin<strong></strong>g inodes can speed up disk I/O? Think of inodes as a back-of-the-book index, which can help you look up information quickly.</li>
</ul>
</li>
<li><strong>Improve network I/O if possible:</strong><a href="http://blog.monitis.com/wp-content/uploads/2012/01/Archive_GZIP1.png"><img class="alignright size-full wp-image-5296" src="http://blog.monitis.com/wp-content/uploads/2012/01/Archive_GZIP1.png" alt="" width="150" height="150" /></a><br />
Turn on the &#8220;<a href="http://wiki.nginx.org/HttpGzipModule" target="_blank">Gzip&#8221;</a> module so you can compress data before sending them over the network. Nowadays the CPUs are so fast that you can even tell NGINX to use level 6 compression just to save a bit bandwidth. If you are worried about CPU hogs, use level 1 compression since it has the best compression to time ratio.</li>
<li><strong>Tweak the HTTP keep alive setting:<br />
</strong>NGINX is so memory efficient that it is possible to use only ~2.5 M to maintain 10k HTTP keep-alive connections. (too scary to be true, isn&#8217;t it?) This gives systemadmin plenty of room to lift the<a href="http://wiki.nginx.org/HttpCoreModule#keepalive_timeout" target="_blank"> &#8220;keep alive</a>&#8221; limit. The idea is to have as many keep alive connections as possible, and set the keep alive timeout with a larger number as well. Why not setting them both to infinite? It is because you want to think about malicious users. Attackers can abuse your generous setting and possibly exhaust your server memory.<strong></strong></li>
<li><strong>Configure NGINX as a load balancer:</strong><br />
This is easy to configure. The example below shows how NGINX uses  round-robin and client IP to achive load-balancing across backend servers.<br />
<a href="http://blog.monitis.com/wp-content/uploads/2012/01/load.png"><img class="size-full wp-image-5178 alignnone" src="http://blog.monitis.com/wp-content/uploads/2012/01/load.png" alt="" width="261" height="232" /></a></li>
<li><strong>Configure NGINX as a reverse proxy:<br />
</strong>Combining Apache with Nginx is a very popular setup. The idea is to have NGINX serve static files, and let Apache handle dynamic content.<br />
<a href="http://blog.monitis.com/wp-content/uploads/2012/01/nginxproxy1.png"><img class="alignnone size-full wp-image-5181" src="http://blog.monitis.com/wp-content/uploads/2012/01/nginxproxy1.png" alt="" width="503" height="270" /></a><a href="http://blog.monitis.com/wp-content/uploads/2012/01/nginxproxy2.png"><img class="alignnone size-full wp-image-5182" src="http://blog.monitis.com/wp-content/uploads/2012/01/nginxproxy2.png" alt="" width="269" height="90" /></a></li>
<li><strong>Only Enable the NGINX modules you need:</strong><br />
<a href="http://blog.monitis.com/wp-content/uploads/2012/01/nginx-module.png"><img class="size-full wp-image-5173 alignright" src="http://blog.monitis.com/wp-content/uploads/2012/01/nginx-module.png" alt="" width="300" height="178" /></a>In other words, turn off the modules you are not using. Keep your NGINX simple and small. Not only you can save memory, this can also improves overall security. For example, if you are not using NGINX as a load balancer, disable the <a href="http://wiki.nginx.org/HttpUpstreamModule" target="_blank">&#8220;Upstream</a>&#8221; module.</li>
<li><strong>Avoid NGINX configuration pitfalls:<br />
</strong>First of all, NGINX is not Apache. If you are new to NGINX&#8217;s configuration, you might want to check out the wiki first to have a glimpse of NGINX&#8217;s <a href="http://wiki.nginx.org/Configuration" target="_blank">rich configuration options</a>. The following are some quick tips for configuring NGINX:</p>
<ul>
<li>Factor out &#8220;root&#8221; outside of a location block.</li>
<li>Factor out &#8220;index&#8221; to the http block.</li>
<li>Avoid using &#8220;if&#8221; unless you really have to.</li>
<li>Use &#8220;try_files&#8221; if you want to check if a file exists.</li>
<li>Use &#8220;try_files&#8221; first to serve static content on dynamic pages.</li>
<li>Use &#8220;script_filename&#8221; to avoid hardcoding absolute paths.</li>
<li>Use &#8221; $request_uri&#8221; to avoid using regular expression</li>
<li>Use &#8220;rewrite&#8221; and &#8220;http://&#8221; to force absolute path.</li>
<li>Use &#8220;map&#8221; to customize your key-value pairs.</li>
<li>Use &#8220;stub_status&#8221; to <a href="http://blog.monitis.com/index.php/2012/01/23/integrate-nginx-monitoring-into-monitis-com/" target="_blank">monitor</a> your server.</li>
<li>You can combine http and https block in NGINX</li>
<li>Set &#8220;<code>proxy_connect_timeout</code>&#8221; higher under heavy load.</li>
<li>Clear browser cache before testing the new configuration.</li>
</ul>
</li>
</ol>
<h3>Conclusion:</h3>
<p>NGINX is the king of serving static contents. Believe it or not, you don&#8217;t need to tweak much to optimize your NGINX server. The default configuration works quite well. It gives you a sense of &#8220;you don&#8217;t pay for what you don&#8217;t use.&#8221; If you do need to customize your NGINX, please follow NGINX best practices and, remember NGINX&#8217;s underlying principle: lean and fast.</p>
<p>We hope you enjoy the article. As a bonus, Monitis® offers enterprise-level solutions to <a title="Nginx Monitoring" href="http://blog.monitis.com/index.php/2012/01/23/integrate-nginx-monitoring-into-monitis-com/" target="_blank">monitor your NGINX servers</a>. You can get your free signup <a href="https://www.monitis.com/free_signup.jsp" target="_blank">here</a>.</p>
<p>&#8212;</p>
<p>Useful Links:<br />
Integrate NGINX Monitoring into Monitis.com:<br />
<a href="http://blog.monitis.com/index.php/2012/01/23/integrate-nginx-monitoring-into-monitis-com/" target="_blank">http://blog.monitis.com/index.php/2012/01/23/integrate-nginx-monitoring-into-monitis-com/</a><br />
Monitis Free Registration:<br />
<a href="https://www.monitis.com/free_signup.jsp" target="_blank">https://www.monitis.com/free_signup.jsp</a></p>
<p><a href="https://www.monitis.com/free_signup.jsp?utm_source=blog&amp;utm_medium=banner&amp;utm_campaign=apache1"><img src="http://blog.monitis.com/wp-content/uploads/2011/07/Banner-468-x-60.jpg" alt="Monitis Monitoring Platform" width="468" height="60" /></a></p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fnginx-best-practices%2F&amp;title=NGINX%20Best%20Practices&amp;notes=%26nbsp%3B%0D%0A%0D%0ANeed%20for%20Speed%3F%0D%0A%0D%0AWith%20its%20first%20public%20release%20in%202004%2C%20NGINX%20now%20is%20the%20second%20most%20used%20web%20server%20in%20the%20world.%20This%20is%20quite%20impressive%20considering%20NGINX%20was%20born%20among%20several%20big%20players%20including%20Apache%2C%20Microsoft%20IIS%2C%20and%20other%20po" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fnginx-best-practices%2F&amp;title=NGINX%20Best%20Practices&amp;bodytext=%26nbsp%3B%0D%0A%0D%0ANeed%20for%20Speed%3F%0D%0A%0D%0AWith%20its%20first%20public%20release%20in%202004%2C%20NGINX%20now%20is%20the%20second%20most%20used%20web%20server%20in%20the%20world.%20This%20is%20quite%20impressive%20considering%20NGINX%20was%20born%20among%20several%20big%20players%20including%20Apache%2C%20Microsoft%20IIS%2C%20and%20other%20po" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fnginx-best-practices%2F&amp;t=NGINX%20Best%20Practices" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fnginx-best-practices%2F&amp;title=NGINX%20Best%20Practices&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=%26nbsp%3B%0D%0A%0D%0ANeed%20for%20Speed%3F%0D%0A%0D%0AWith%20its%20first%20public%20release%20in%202004%2C%20NGINX%20now%20is%20the%20second%20most%20used%20web%20server%20in%20the%20world.%20This%20is%20quite%20impressive%20considering%20NGINX%20was%20born%20among%20several%20big%20players%20including%20Apache%2C%20Microsoft%20IIS%2C%20and%20other%20po" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fnginx-best-practices%2F&amp;Title=NGINX%20Best%20Practices" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fnginx-best-practices%2F&amp;title=NGINX%20Best%20Practices" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fnginx-best-practices%2F&amp;title=NGINX%20Best%20Practices&amp;annotation=%26nbsp%3B%0D%0A%0D%0ANeed%20for%20Speed%3F%0D%0A%0D%0AWith%20its%20first%20public%20release%20in%202004%2C%20NGINX%20now%20is%20the%20second%20most%20used%20web%20server%20in%20the%20world.%20This%20is%20quite%20impressive%20considering%20NGINX%20was%20born%20among%20several%20big%20players%20including%20Apache%2C%20Microsoft%20IIS%2C%20and%20other%20po" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fnginx-best-practices%2F&amp;title=NGINX%20Best%20Practices" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fnginx-best-practices%2F&amp;title=NGINX%20Best%20Practices" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=NGINX%20Best%20Practices%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fnginx-best-practices%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/01/30/nginx-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VDI on Windows Server 2008 R2 Hyper-V: Performance Monitoring Explained&#8211;Part 1</title>
		<link>http://blog.monitis.com/index.php/2012/01/30/vdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-1/</link>
		<comments>http://blog.monitis.com/index.php/2012/01/30/vdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-1/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 09:06:52 +0000</pubDate>
		<dc:creator>Ard-Jan Barnas</dc:creator>
				<category><![CDATA[101 Reasons To Choose Monitis]]></category>
		<category><![CDATA[Monitoring Scripts]]></category>
		<category><![CDATA[Network Monitoring]]></category>
		<category><![CDATA[Performance Management]]></category>
		<category><![CDATA[Server Management]]></category>
		<category><![CDATA[Windows Networking]]></category>
		<category><![CDATA[hyper-v]]></category>
		<category><![CDATA[VDI]]></category>
		<category><![CDATA[virtual desktop interface]]></category>
		<category><![CDATA[virtual machines]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=5104</guid>
		<description><![CDATA[In this article we’ll go into VDI (virtual desktop interface) monitoring on Windows Server Hyper-V and in particular what and where to monitor and what counters to utilize to determine of your virtual machine is overloaded and what resources are used. This article focuses on measuring networking, storage, and CPU usage. Windows Hyper-V has three main [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-2646 alignnone" style="margin: 15px; float: right;" title="logo-hyperv-server08-R2" src="http://blog.monitis.com/wp-content/uploads/2011/07/logo-hyperv-server08-R2.png" alt="hyperv" width="250" /><span style="font-size: small;">In this article we’ll go into <strong>VDI</strong> (virtual desktop interface) monitoring on Windows Server <strong>Hyper-V</strong> and in particular what and where to monitor and what counters to utilize to determine of your virtual machine is overloaded and what resources are used. This article focuses on measuring networking, storage, and CPU usage.</span></p>
<p>Windows Hyper-V has three main components, each of which can be monitored; the virtstack, devices, and the hypervisor. When Windows 2008 boots the system it launches the virtstack and hypervisor. The virtstack handles the emulated devices, manages virtual machines, services I/O, etc. The Hypervisor schedules the virtual processors, manages interrupts, services timers, and controls other chip-level functions.<span id="more-5104"></span></p>
<p>The root partition in Hyper-V provides the monitoring information via WMI and performance counters. Although you can monitor a virtual machine from within the running guest operating system, you only have access to the metric provided by that specific OS. One thing to keep in mind is that when querying the metric %Processor, it reports on the virtual processor(s) used in the guest, not the physical processor of the host system.</p>
<p>So to monitor Hyper-V and all virtual machines, you should monitor the root. Now let’s take a look at what you should monitor. We’ll cover the major resources and what to typically monitor to provide a good starting point. The top level metrics to monitor are the following:</p>
<p><strong>Overall health:</strong></p>
<ul>
<li>Hyper-V Virtual Machine Health Summary</li>
<li>Hyper-V Hypervisor</li>
</ul>
<p><strong>Processor:</strong></p>
<ul>
<li>Processor</li>
<li>Hyper-V Hypervisor Logical Processor</li>
<li>Hyper-V Hypervisor Root Virtual Processor</li>
<li>Hyper-V Hypervisor Virtual Processor</li>
</ul>
<p><strong>Memory:</strong></p>
<ul>
<li>Memory</li>
<li>Hyper-V Hypervisor Partition</li>
<li>Hyper-V Root Partition</li>
<li>Hyper-V VM Vid Partition</li>
</ul>
<p><strong>Networking:</strong></p>
<ul>
<li>Network Interface</li>
<li>Hyper-V Virtual Switch</li>
<li>Hyper-V Legacy Network Adapter</li>
<li>Hyper-V Virtual Network Adapter</li>
</ul>
<p><strong>Storage:</strong></p>
<ul>
<li>Physical Disk</li>
<li>Hyper-V Virtual Storage Device</li>
<li>Hyper-V Virtual IDE Controller</li>
</ul>
<p>In this first part of the ‘monitoring explained’ articles, we’ll look at the Overall Health Metrics set of performance counters and how to use them. The other sets are discussed in Part 2.</p>
<p><strong>Overall Health Metrics</strong></p>
<p>There are two counter sets you can use to get an overall picture of the system:</p>
<p><strong><em>1. </em></strong><strong><em>Hyper-V Virtual Machine Health Summary </em></strong>which has two counters; “<strong><em>Health Ok” </em></strong>and<em> “<strong>Health Critical”</strong></em>. Critical means some resource has been exhausted or another unrecoverable error has occurred. If you see “<strong><em>Health Critical” </em></strong>you should take action to figure out what has happened.</p>
<p><strong><em>2. </em></strong><strong><em>Hyper-V Hypervisor</em></strong>. This set has the <strong><em>Logical Processor </em></strong>counter, the number of virtual machines running is measured by the <strong><em>Partitions</em></strong> counter, and the total number of Virtual Processors is provided by the <strong><em>Virtual Processors</em></strong> counter. The logical processors are important because this is where all the work is done and are a representation of the physical processor. Microsoft recommends that you do not exceed an 8:1 ratio for the the Virtual Processor to Logical Processor ratio.</p>
<p>The <strong><em>Total Pages</em></strong> counter indicates how much memory the Hypervisor is using to manage the virtual machine. This counter does not capture all the overhead because another component called the Virtual Interface Driver (VID) also has overhead to manage partitions. Note that in Windows 2008 the counter <strong><em>Hyper-V VID Partition</em></strong> does not work, but it does in Windows Server 2008 R2.</p>
<p>In our next article in this series we’ll discuss the Processor, Memory, and Storage counter sets in detail. We will also provide a custom monitor for Hyper-V that utilizes most of the metrics that are discussed in this series.</p>
<p>See also <a title="Permanent Link to Monitoring Hyper-V With PowerShell on Monitis" href="http://blog.monitis.com/index.php/2011/09/15/monitoring-hyper-v-with-powershell-on-monitis/" rel="bookmark">Monitoring Hyper-V With PowerShell on Monitis</a></p>
<p>&nbsp;</p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-1%2F&amp;title=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%201&amp;notes=In%20this%20article%20we%E2%80%99ll%20go%20into%20VDI%20%28virtual%20desktop%20interface%29%C2%A0monitoring%20on%20Windows%20Server%20Hyper-V%20and%20in%20particular%20what%20and%20where%20to%20monitor%20and%20what%20counters%20to%20utilize%20to%20determine%20of%20your%20virtual%20machine%20is%20overloaded%20and%20what%20resources%20are%20u" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-1%2F&amp;title=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%201&amp;bodytext=In%20this%20article%20we%E2%80%99ll%20go%20into%20VDI%20%28virtual%20desktop%20interface%29%C2%A0monitoring%20on%20Windows%20Server%20Hyper-V%20and%20in%20particular%20what%20and%20where%20to%20monitor%20and%20what%20counters%20to%20utilize%20to%20determine%20of%20your%20virtual%20machine%20is%20overloaded%20and%20what%20resources%20are%20u" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-1%2F&amp;t=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%201" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-1%2F&amp;title=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%201&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=In%20this%20article%20we%E2%80%99ll%20go%20into%20VDI%20%28virtual%20desktop%20interface%29%C2%A0monitoring%20on%20Windows%20Server%20Hyper-V%20and%20in%20particular%20what%20and%20where%20to%20monitor%20and%20what%20counters%20to%20utilize%20to%20determine%20of%20your%20virtual%20machine%20is%20overloaded%20and%20what%20resources%20are%20u" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-1%2F&amp;Title=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%201" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-1%2F&amp;title=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%201" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-1%2F&amp;title=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%201&amp;annotation=In%20this%20article%20we%E2%80%99ll%20go%20into%20VDI%20%28virtual%20desktop%20interface%29%C2%A0monitoring%20on%20Windows%20Server%20Hyper-V%20and%20in%20particular%20what%20and%20where%20to%20monitor%20and%20what%20counters%20to%20utilize%20to%20determine%20of%20your%20virtual%20machine%20is%20overloaded%20and%20what%20resources%20are%20u" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-1%2F&amp;title=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%201" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-1%2F&amp;title=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%201" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=VDI%20on%20Windows%20Server%202008%20R2%20Hyper-V%3A%20Performance%20Monitoring%20Explained%26ndash%3BPart%201%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F30%2Fvdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-1%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/01/30/vdi-on-windows-server-2008-r2-hyper-v-performance-monitoring-explainedpart-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Blog Summary for Week of January 23</title>
		<link>http://blog.monitis.com/index.php/2012/01/29/blog-summary-for-week-of-january-23/</link>
		<comments>http://blog.monitis.com/index.php/2012/01/29/blog-summary-for-week-of-january-23/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 10:29:32 +0000</pubDate>
		<dc:creator>Seb Kiureghian</dc:creator>
				<category><![CDATA[Weekly Summary]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=5154</guid>
		<description><![CDATA[1. Integrate NGINX Monitoring into Monitis.com NGINX is one of the most popular new web servers out there. It is lightweight and powerful. But monitoring it is no small task. The statistics module that comes with NGINX is not reader friendly, so this post shows you how to monitor NGINX performance with Monitis. In 5 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.monitis.com/wp-content/uploads/2011/11/logo.png"><img class="alignright size-full wp-image-4283" title="logo" src="http://blog.monitis.com/wp-content/uploads/2011/11/logo.png" alt="" width="187" height="74" /></a>1. <a href="http://blog.monitis.com/index.php/2012/01/23/integrate-nginx-monitoring-into-monitis-com/">Integrate NGINX Monitoring into Monitis.com</a><br />
NGINX is one of the most popular new web servers out there. It is lightweight and powerful. But monitoring it is no small task. The statistics module that comes with NGINX is not reader friendly, so this post shows you how to monitor NGINX performance with Monitis. In 5 quick and easy steps, Monitis creates a monitor for your NGINX server, with a column for each performance metric. Graphs are shown.<span id="more-5154"></span></p>
<p>2. <a href="http://blog.monitis.com/index.php/2012/01/24/using-tomcat-with-a-database-performance-optimization-tips/">Using Tomcat With a Database – Performance Optimization Tips</a><br />
Do you use Apache Tomcat with a database? Here are 6 tips for optimizing performance for that combination. For example, it&#8217;s important to determine the cause of database connection timeouts. One of the common causes is garbage collection. Tip 2 describes how this happens and what can be done to improve performance.</p>
<p>3. <a href="http://blog.monitis.com/index.php/2012/01/25/cassandra-and-monitis/">Cassandra and Monitis</a><br />
Cassandra is one of the more popular highly scalable NoSQL databases. If you work with Cassandra, this article will show you how to use Monitis to keep track of the performance of your Cassandra cluster. Code is provided on the Monitis Github page that shows you how many Cassandra nodes you have up and running as well as read and write latencies. You can set alerts on these metrics.</p>
<p>4. <a href="http://blog.monitis.com/index.php/2012/01/27/m3-code-refactor-dbi-support/">M3 code refactor &amp; DBI support</a><br />
M3, the Monitis Monitor Manager, was first described in <a href="http://blog.monitis.com/index.php/2011/11/11/the-simplicity-of-server-monitoring-monitis-m3/">this article</a>. Monitis has recently decided to make M3 pluggable to make it easy to add execution and parsing plugins. This posts introduces some of the things you can do with this pluggability. It describes Database integration with Monitis using M3. There are many benefits monitoring your database health in Monitis. This post shows how to make a query and monitor its results. Monitis is anxious to hear your input on how best to use M3 to meet your monitoring needs.</p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F29%2Fblog-summary-for-week-of-january-23%2F&amp;title=Blog%20Summary%20for%20Week%20of%20January%2023&amp;notes=1.%20Integrate%20NGINX%20Monitoring%20into%20Monitis.com%0D%0ANGINX%20is%20one%20of%20the%20most%20popular%20new%20web%20servers%20out%20there.%20It%20is%20lightweight%20and%20powerful.%20But%20monitoring%20it%20is%20no%20small%20task.%20The%20statistics%20module%20that%20comes%20with%20NGINX%20is%20not%20reader%20friendly%2C%20so%20thi" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F29%2Fblog-summary-for-week-of-january-23%2F&amp;title=Blog%20Summary%20for%20Week%20of%20January%2023&amp;bodytext=1.%20Integrate%20NGINX%20Monitoring%20into%20Monitis.com%0D%0ANGINX%20is%20one%20of%20the%20most%20popular%20new%20web%20servers%20out%20there.%20It%20is%20lightweight%20and%20powerful.%20But%20monitoring%20it%20is%20no%20small%20task.%20The%20statistics%20module%20that%20comes%20with%20NGINX%20is%20not%20reader%20friendly%2C%20so%20thi" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F29%2Fblog-summary-for-week-of-january-23%2F&amp;t=Blog%20Summary%20for%20Week%20of%20January%2023" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F29%2Fblog-summary-for-week-of-january-23%2F&amp;title=Blog%20Summary%20for%20Week%20of%20January%2023&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=1.%20Integrate%20NGINX%20Monitoring%20into%20Monitis.com%0D%0ANGINX%20is%20one%20of%20the%20most%20popular%20new%20web%20servers%20out%20there.%20It%20is%20lightweight%20and%20powerful.%20But%20monitoring%20it%20is%20no%20small%20task.%20The%20statistics%20module%20that%20comes%20with%20NGINX%20is%20not%20reader%20friendly%2C%20so%20thi" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F29%2Fblog-summary-for-week-of-january-23%2F&amp;Title=Blog%20Summary%20for%20Week%20of%20January%2023" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F29%2Fblog-summary-for-week-of-january-23%2F&amp;title=Blog%20Summary%20for%20Week%20of%20January%2023" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F29%2Fblog-summary-for-week-of-january-23%2F&amp;title=Blog%20Summary%20for%20Week%20of%20January%2023&amp;annotation=1.%20Integrate%20NGINX%20Monitoring%20into%20Monitis.com%0D%0ANGINX%20is%20one%20of%20the%20most%20popular%20new%20web%20servers%20out%20there.%20It%20is%20lightweight%20and%20powerful.%20But%20monitoring%20it%20is%20no%20small%20task.%20The%20statistics%20module%20that%20comes%20with%20NGINX%20is%20not%20reader%20friendly%2C%20so%20thi" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F29%2Fblog-summary-for-week-of-january-23%2F&amp;title=Blog%20Summary%20for%20Week%20of%20January%2023" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F29%2Fblog-summary-for-week-of-january-23%2F&amp;title=Blog%20Summary%20for%20Week%20of%20January%2023" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=Blog%20Summary%20for%20Week%20of%20January%2023%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F29%2Fblog-summary-for-week-of-january-23%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/01/29/blog-summary-for-week-of-january-23/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>M3 code refactor &amp; DBI support</title>
		<link>http://blog.monitis.com/index.php/2012/01/27/m3-code-refactor-dbi-support/</link>
		<comments>http://blog.monitis.com/index.php/2012/01/27/m3-code-refactor-dbi-support/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 22:35:44 +0000</pubDate>
		<dc:creator>Dan Fruehauf</dc:creator>
				<category><![CDATA[101 Reasons To Choose Monitis]]></category>
		<category><![CDATA[Applications Monitoring]]></category>
		<category><![CDATA[Database Management]]></category>
		<category><![CDATA[Database Monitoring]]></category>
		<category><![CDATA[Management Scripts]]></category>
		<category><![CDATA[Monitis API]]></category>
		<category><![CDATA[Monitoring Scripts]]></category>
		<category><![CDATA[MS SQL Server Monitoring]]></category>
		<category><![CDATA[MySQL monitoring]]></category>
		<category><![CDATA[Network Monitoring]]></category>
		<category><![CDATA[Server Management]]></category>
		<category><![CDATA[Sysadmin Tools]]></category>
		<category><![CDATA[Uptime Monitoring]]></category>
		<category><![CDATA[Website Monitoring]]></category>
		<category><![CDATA[agent-based monitoring]]></category>
		<category><![CDATA[command-line tools]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[DBI]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[M3]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[systems administration]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=4833</guid>
		<description><![CDATA[Pluggable M3 (Monitis Monitor Manager) Framework Who needs an introduction about M3? &#8211; Perhaps no one! After gaining some reputation with M3, providing extra-easy integration of any monitor into Monitis it was time to take it to the next level. Generally speaking, the work flow of M3 was described in detail in this article. After [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.monitis.com/wp-content/uploads/2012/01/PluggableM3FlowChart.jpg"><img style="margin: 10px; float: right;" src="http://blog.monitis.com/wp-content/uploads/2012/01/PluggableM3FlowChart.jpg" alt="" width="250" /></a></p>
<h3 id="internal-source-marker_0.17348082229178274">Pluggable M3 (Monitis Monitor Manager) Framework</h3>
<p>Who needs an introduction about M3? &#8211; Perhaps no one!<br />
After gaining some reputation with M3, providing extra-easy integration of any monitor into <a href="http://www.monitis.com/">Monitis</a> it was time to take it to the next level.</p>
<p>Generally speaking, the work flow of M3 was described in detail in <a href="../index.php/2011/11/11/the-simplicity-of-server-monitoring-monitis-m3/">this article</a>.</p>
<p>After some thought and design, we&#8217;ve decided it&#8217;d be best if M3 was pluggable. Pluggable in terms of being able to easily add execution and parsing plugins.<br />
The interface and behavior of M3 stayed exactly the same, however now it is much easier to obtain data from any source and parse the data the way you want it.<br />
Saying that, it was time to put the new design for a test. We tried to integrate the <a href="../index.php/2011/07/30/a-dbi-interface-for-monitis/">DBI support</a> into M3.<br />
Guess what – it was much easier than expected!<span id="more-4833"></span></p>
<h3>The general idea of DB integration with Monitis</h3>
<p>DB (as in Database) integration with <a href="http://www.monitis.com/">Monitis</a> has shown to be invaluable. Being able to extract application related data from a DB and load it to Monitis means you can graph anything going on in your database related application. Monitoring your DB is an integral part of server monitoring in today&#8217;s world.</p>
<p>Be it maximum number of users at peak hours, gathering statistics about record usage or just checking if your DB is serving requests quickly enough &#8211; graphing performance and uptime. Your imagination is the limit – considering your application is DB related of course.</p>
<h3>How it&#8217;s done – the technicalities beyond</h3>
<p>The sharp-eyed among you would notice that <a href="https://github.com/monitisexchange/Monitis-Linux-Scripts/tree/master/M3">M3</a> got beefed up with a directory named “Execution” and a directory named “Parsing”.<br />
These directories hold the plugins M3 uses for each.</p>
<p>All that I had to do to add DBI support is to create a new execution plugin called “DBI.pm” and fill it up with code from the <a href="../index.php/2011/07/30/a-dbi-interface-for-monitis/">Monitis DBI module</a> which already existed.</p>
<p>And that my friends, that, was easy. Mission accomplished – Pluggable M3 eases the job for us.</p>
<h3>Another way to integrate MySQL</h3>
<p>MySQL could have been integrated previously into <a href="https://github.com/monitisexchange/Monitis-Linux-Scripts/tree/master/M3">M3</a> by executing mysql and feeding it with a query, having something similar to:</p>
<pre style="padding-left: 30px; padding-bottom: 1em;"><code> &lt;exectemplate&gt;echo "select count(*) from mysql.user;" | mysql&lt;/exectemplate&gt; </code></pre>
<p>This form of execution will invoke the &#8216;mysql&#8217; executable, feeding it the above query. Execution of this will result in the response of the query being returned with some other useless output.</p>
<p>Please avoid this form of execution, as now DBI support is fully integrated into M3. In the next paragraph I&#8217;ll show how it should be done.</p>
<h3>Lets fetch</h3>
<p>While conveying ideas about M3, I decided to prefer to provide very simple examples of operation, however, I encourage you, the end user to let your imagination go wild, adding interesting counters which show how your application really perform and behave.</p>
<p>In <a href="https://github.com/monitisexchange/Monitis-Linux-Scripts/blob/master/M3/dbi_sample.xml">this example</a> we&#8217;ll just count the number of users in an installed MySQL database. An example anyone should be able to imitate and then scale to his own need.</p>
<p>We&#8217;ll examine the <a href="https://github.com/monitisexchange/Monitis-Linux-Scripts/blob/master/M3/dbi_sample.xml">following example</a>. I suggest opening the mentioned link in a new window while continuing the read.<br />
Looking at this example it is quite straight-forward to understand. The query to execute is over there, together with some other parameters which are mandatory to connect to a database, such as the database name, user name, password, etc.</p>
<p>An explanation should be provided however for the odd db_statistics parameter. Those of you who have read the <a href="../index.php/2011/09/27/http-extraction-with-monitis/">HTTP extraction article</a> about M3 would have probably remembered the <em>http_statistics</em> parameter. Then, the <em>db_statistics</em> one does more or less the same, providing some meta counters for the query:</p>
<ol>
<li>How long did the query take to process (in seconds)</li>
<li>The success/failure of the query (1 for success, 0 for failure)</li>
</ol>
<p>I encourage to do the parsing of query results, or actually the lack-of-parsing of query results in a way that takes the whole output returns from the query, hence the regular expression of <em>(.*)</em>.</p>
<p>If your query returns more than what you need, <strong>please tune your query better</strong>.<br />
Test your execution with:</p>
<pre style="padding-left: 30px; padding-bottom: 1em;"><code> # ./DryRun.pl dbi_sample.xml DB: 'root@DBI:mysql:mysql:localhost', Query: 'select count(*) from mysql.user;' at MonitisMonitorManager.pm line 223 Matched '(.*)'=&gt;'6' in '6' at MonitisMonitorManager.pm line 237 OK This is a dry run, data for monitor 'Sample MySQL Monitor' was not really updated. at ./DryRun.pl line 18 </code></pre>
<p>It should work. Then you can work your query to fit your own needs.</p>
<h3>Next in line</h3>
<p>We&#8217;re looking for some more new ideas to add as plugins for M3. If you have any idea about any plugin (execution or parsing plugin) that you would like to see in M3 – we want to hear you!</p>
<p>Integrating software into the powerful <a href="http://www.monitis.com/">Monitis</a> has never been easier, now that you have M3!</p>
<p><a href="http://www.monitis.com/">Monitis</a> can monitor anything! Follow us also on<a href="http://twitter.com/#%21/monitis"> Twitter</a> and<a href="https://github.com/monitisexchange"> GitHub</a>.</p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F27%2Fm3-code-refactor-dbi-support%2F&amp;title=M3%20code%20refactor%20%26amp%3B%20DBI%20support&amp;notes=%0D%0APluggable%20M3%20%28Monitis%20Monitor%20Manager%29%20Framework%0D%0AWho%20needs%20an%20introduction%20about%20M3%3F%20-%20Perhaps%20no%20one%21%0D%0AAfter%20gaining%20some%20reputation%20with%20M3%2C%20providing%20extra-easy%20integration%20of%20any%20monitor%20into%20Monitis%20it%20was%20time%20to%20take%20it%20to%20the%20next%20level.%0D%0A" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F27%2Fm3-code-refactor-dbi-support%2F&amp;title=M3%20code%20refactor%20%26amp%3B%20DBI%20support&amp;bodytext=%0D%0APluggable%20M3%20%28Monitis%20Monitor%20Manager%29%20Framework%0D%0AWho%20needs%20an%20introduction%20about%20M3%3F%20-%20Perhaps%20no%20one%21%0D%0AAfter%20gaining%20some%20reputation%20with%20M3%2C%20providing%20extra-easy%20integration%20of%20any%20monitor%20into%20Monitis%20it%20was%20time%20to%20take%20it%20to%20the%20next%20level.%0D%0A" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F27%2Fm3-code-refactor-dbi-support%2F&amp;t=M3%20code%20refactor%20%26amp%3B%20DBI%20support" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F27%2Fm3-code-refactor-dbi-support%2F&amp;title=M3%20code%20refactor%20%26amp%3B%20DBI%20support&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=%0D%0APluggable%20M3%20%28Monitis%20Monitor%20Manager%29%20Framework%0D%0AWho%20needs%20an%20introduction%20about%20M3%3F%20-%20Perhaps%20no%20one%21%0D%0AAfter%20gaining%20some%20reputation%20with%20M3%2C%20providing%20extra-easy%20integration%20of%20any%20monitor%20into%20Monitis%20it%20was%20time%20to%20take%20it%20to%20the%20next%20level.%0D%0A" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F27%2Fm3-code-refactor-dbi-support%2F&amp;Title=M3%20code%20refactor%20%26amp%3B%20DBI%20support" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F27%2Fm3-code-refactor-dbi-support%2F&amp;title=M3%20code%20refactor%20%26amp%3B%20DBI%20support" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F27%2Fm3-code-refactor-dbi-support%2F&amp;title=M3%20code%20refactor%20%26amp%3B%20DBI%20support&amp;annotation=%0D%0APluggable%20M3%20%28Monitis%20Monitor%20Manager%29%20Framework%0D%0AWho%20needs%20an%20introduction%20about%20M3%3F%20-%20Perhaps%20no%20one%21%0D%0AAfter%20gaining%20some%20reputation%20with%20M3%2C%20providing%20extra-easy%20integration%20of%20any%20monitor%20into%20Monitis%20it%20was%20time%20to%20take%20it%20to%20the%20next%20level.%0D%0A" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F27%2Fm3-code-refactor-dbi-support%2F&amp;title=M3%20code%20refactor%20%26amp%3B%20DBI%20support" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F27%2Fm3-code-refactor-dbi-support%2F&amp;title=M3%20code%20refactor%20%26amp%3B%20DBI%20support" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=M3%20code%20refactor%20%26amp%3B%20DBI%20support%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F27%2Fm3-code-refactor-dbi-support%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/01/27/m3-code-refactor-dbi-support/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cassandra and Monitis</title>
		<link>http://blog.monitis.com/index.php/2012/01/25/cassandra-and-monitis/</link>
		<comments>http://blog.monitis.com/index.php/2012/01/25/cassandra-and-monitis/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 21:09:08 +0000</pubDate>
		<dc:creator>Brad Carleton</dc:creator>
				<category><![CDATA[Database Management]]></category>
		<category><![CDATA[Monitoring Scripts]]></category>
		<category><![CDATA[NoSQL Monitoring]]></category>
		<category><![CDATA[Performance Management]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache cassandra]]></category>
		<category><![CDATA[cassandra]]></category>
		<category><![CDATA[nosql]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=5143</guid>
		<description><![CDATA[Cassandra is a robust and highly scalable NoSQL datastore that usually consists of multiple nodes spread out across multiple datacenters.  If you are the system administrator for a large Cassandra deployment then you might be curious as to how your cluster is doing.  In fact your job probably depends on it!  So how can you [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-4707" style="float: right; padding: 10px;" title="apache_cassandra_logo" src="http://blog.monitis.com/wp-content/uploads/2011/12/apache_cassandra_logo.jpeg" alt="" width="200" height="131" /></p>
<p dir="ltr">Cassandra is a robust and highly scalable NoSQL datastore that usually consists of multiple nodes spread out across multiple datacenters.  If you are the system administrator for a large Cassandra deployment then you might be curious as to how your cluster is doing.  In fact your job probably depends on it!  So how can you combine a great service like <a href="http://portal.monitis.com">Monitis</a> with <a href="http://cassandra.apache.org">Cassandra</a> to make sure you cluster is buzzing along smoothly?</p>
<div>
<p>We have done a little bit of the work for you and created an open source <a href="http://github.com/monitisexchange/MonitisCassandra">Monitis-Cassandra</a> project that can help you monitor your Cassandra clusters in style.Let’s get started, first you need to grab the code:<span id="more-5143"></span></p>
<pre>git clone git://github.com/monitisexchange/Monitis-Linux-Scripts.git</pre>
</div>
<div>
<pre>cd Monitis-Linux-Scripts/cassandra</pre>
<p>Next, you need to open the file, “settings.py”, and insert your API key and secret (read up on their excelent Monitis API [<a href="http://portal.monitis.com/index.php/open-api">here</a>]).  Then add your column families to the column families list, and you are ready to create your custom Monitis monitors by running the following command:</p>
<pre>./setup_monitors</pre>
<p>After the monitors are setup you can start to send data by running:</p>
<pre>./send_data</pre>
<p>Set that to run on cron or any other scheduling agent, and you have yourself a fully functioning monitoring system for your Cassandra cluster!  Check back in to the Monitis Web site to see all your fresh Cassandra metrics rolling in.</p>
<p>You can see how many nodes are currently running and how many are currently active.  This is important, and you might want to set up a Monitis alert to let you know whenever one of your nodes goes down.  (Keep in mind that Cassandra should still be running fine with a single node failure, but it is definitely important to stay in the know.)</p>
<p>Since Cassandra is a Java application, you can also get information about the size of the heap space.  You might want to set an alert to go off if your Cassandra node is running out of memory, because once it does it will start paging to disk.  Now there is nothing wrong with paging to disk if that is what you have to do, but keep in mind that it can be a significant performance hit.</p>
<p>Finally, there are some really fine-grained per column family metrics that come in through this open source tool.  You can get read and write latency for each of your column families!  This is great!  If your read latency is moving above 200ms, then set an alert in Monitis to stay on top of the problem.  You can set alerts on the write latency as well.  Fine-grained monitoring of individual Column Families is a great way to make sure that your cluster is operating at peak performance.</p>
<p>Also, if you are Netflix then you may want to set an alert in case your permformance ever drop below [1 million writes per second] (<a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">http</a><a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">://</a><a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">techblog</a><a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">.</a><a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">netflix</a><a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">.</a><a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">com</a><a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">/2011/11/</a><a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">benchmarking</a><a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">-</a><a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">cassandra</a><a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">-</a><a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">scalability</a><a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">-</a><a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">on</a><a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">.</a><a href="http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html">html</a>)!  Until next time.</p>
<p>&nbsp;</p>
</div>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F25%2Fcassandra-and-monitis%2F&amp;title=Cassandra%20and%20Monitis&amp;notes=%0D%0ACassandra%20is%20a%20robust%20and%20highly%20scalable%20NoSQL%20datastore%20that%20usually%20consists%20of%20multiple%20nodes%20spread%20out%20across%20multiple%20datacenters.%20%C2%A0If%20you%20are%20the%20system%20administrator%20for%20a%20large%20Cassandra%20deployment%20then%20you%20might%20be%20curious%20as%20to%20how%20you" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F25%2Fcassandra-and-monitis%2F&amp;title=Cassandra%20and%20Monitis&amp;bodytext=%0D%0ACassandra%20is%20a%20robust%20and%20highly%20scalable%20NoSQL%20datastore%20that%20usually%20consists%20of%20multiple%20nodes%20spread%20out%20across%20multiple%20datacenters.%20%C2%A0If%20you%20are%20the%20system%20administrator%20for%20a%20large%20Cassandra%20deployment%20then%20you%20might%20be%20curious%20as%20to%20how%20you" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F25%2Fcassandra-and-monitis%2F&amp;t=Cassandra%20and%20Monitis" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F25%2Fcassandra-and-monitis%2F&amp;title=Cassandra%20and%20Monitis&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=%0D%0ACassandra%20is%20a%20robust%20and%20highly%20scalable%20NoSQL%20datastore%20that%20usually%20consists%20of%20multiple%20nodes%20spread%20out%20across%20multiple%20datacenters.%20%C2%A0If%20you%20are%20the%20system%20administrator%20for%20a%20large%20Cassandra%20deployment%20then%20you%20might%20be%20curious%20as%20to%20how%20you" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F25%2Fcassandra-and-monitis%2F&amp;Title=Cassandra%20and%20Monitis" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F25%2Fcassandra-and-monitis%2F&amp;title=Cassandra%20and%20Monitis" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F25%2Fcassandra-and-monitis%2F&amp;title=Cassandra%20and%20Monitis&amp;annotation=%0D%0ACassandra%20is%20a%20robust%20and%20highly%20scalable%20NoSQL%20datastore%20that%20usually%20consists%20of%20multiple%20nodes%20spread%20out%20across%20multiple%20datacenters.%20%C2%A0If%20you%20are%20the%20system%20administrator%20for%20a%20large%20Cassandra%20deployment%20then%20you%20might%20be%20curious%20as%20to%20how%20you" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F25%2Fcassandra-and-monitis%2F&amp;title=Cassandra%20and%20Monitis" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F25%2Fcassandra-and-monitis%2F&amp;title=Cassandra%20and%20Monitis" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=Cassandra%20and%20Monitis%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F25%2Fcassandra-and-monitis%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/01/25/cassandra-and-monitis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Tomcat With a Database &#8211; Performance Optimization Tips</title>
		<link>http://blog.monitis.com/index.php/2012/01/24/using-tomcat-with-a-database-performance-optimization-tips/</link>
		<comments>http://blog.monitis.com/index.php/2012/01/24/using-tomcat-with-a-database-performance-optimization-tips/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 08:30:43 +0000</pubDate>
		<dc:creator>Hovhannes Avoyan</dc:creator>
				<category><![CDATA[Java Monitoring]]></category>
		<category><![CDATA[MySQL monitoring]]></category>
		<category><![CDATA[Performance Management]]></category>
		<category><![CDATA[Website Monitoring]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache tomcat]]></category>
		<category><![CDATA[apache tuning]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java servlet]]></category>
		<category><![CDATA[javaserver pages]]></category>
		<category><![CDATA[JSP]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://blog.monitis.com/?p=5120</guid>
		<description><![CDATA[The Internet is a great resource, but it is sometimes too much to wade through hundreds of web pages looking for tips about using Tomcat with a database. So we at Monitis have done it for you! Below are some of the more useful tips found in various places on the Internet. Tip #1 – [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-3372" style="float: right; padding: 10;" title="java_tomcat" src="http://blog.monitis.com/wp-content/uploads/2011/08/java_tomcat.jpg" alt="" width="150" /></p>
<p>The Internet is a great resource, but it is sometimes too much to wade through hundreds of web pages looking for tips about using Tomcat with a database. So we at Monitis have done it for you! Below are some of the more useful tips found in various places on the Internet.</p>
<h3><span id="more-5120"></span>Tip #1 – Don’t Ignore Database Performance</h3>
<p>Webapps typically use databases. So, you have to tune the webapp along with the database if you want optimal performance. Take our advice. Performance test the database and define an appropriate database connection pool (maxActive, maxIdle, and maxWait in the Resource element).</p>
<h3>Tip #2 – Determine the Cause of Database Connection Timeouts</h3>
<p>Simply increasing maxWait in the resource element may not be the best way to deal with database connection timeouts. The timeouts may be the result of garbage collection.</p>
<p>Garbage collection requires that all running processes in the Java virtual machine be temporarily suspended. If garbage collection takes too long, the database connections will time out. The timeout here is not because of some problem in the application. It is simply because garbage collection is taking too long.</p>
<p>The more frequently garbage is collected, the less garbage there will be to collect each time. Configure garbage collection so it does not take more than one second.</p>
<h3>Tip #3 – Share Database Connections</h3>
<p>If every application opens and closes its own database connections, all applications run slower. Instead, if applications share connections by returning them to a common pool rather than closing them, all applications run faster.</p>
<p>Tomcat can be configured for this type of connection pooling. Simply set maxActive and maxIdle to appropriate values in the resource element.</p>
<h3>Tip #4 – Return Database Connections to the Pool Properly</h3>
<p>Do not close database connections twice. When using connection pooling, the first time you close you return the connection to the pool, and the second time you close, you could inadvertently close the connection after another application has started using it. If you are experiencing “Connection Closed” exceptions, this may be the cause. So, don’t do that!</p>
<h3>Tip #5 – Configure Your Database as a Global Naming Resource or For a Single Context</h3>
<p>Identify the Java Database Connectivity (JDBC) database in a resource element in the context.xml file if you want the resource to be available to one application only. Identify the JDBC resource in a resource element in the server.xml file if you want the resource to be available to all applications.</p>
<p>If multiple applications need access to a database, the database resource can be created globally in the server.xml file or each application can create its own resource in its own context.xml file. You need to decide which is best.</p>
<p>Making databases available to one application only (in context.xml) creates the resource when the application starts. Making databases available globally (in server.xml) creates the resource when the server starts, which means restarting the server every time you make changes to the resource configuration.</p>
<p>Configuring the database resource in the context.xml file once for each application is recommended because it makes the application more portable.</p>
<p>If different applications have different access levels and those access levels are determined by the database user id, then the database resource must be configured in each application’s context.xml file.</p>
<h3>Tip #6 – Do Not Use the JDBC-ODBC Bridge</h3>
<p>The JDBC-ODBC (Open Database Connectivity) Bridge bundled with Tomcat’s Java Development Kit (JDK) was never intended for a production environment. Use a third-party driver instead.</p>
<p>Using Tomcat with a database is easy. All you have to know are some good tips to keep your database performing trouble-free. Monitis is happy to provide you with this knowledge and advice. Read more about Tomcat here!</p>
<p>More about <a title="Tomcat performance " href="http://blog.monitis.com/index.php/tag/tomcat/">Apache Tomcat performance optimization</a> tips here.</p>
Share Now:<a rel="nofollow"   href="http://delicious.com/post?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F24%2Fusing-tomcat-with-a-database-performance-optimization-tips%2F&amp;title=Using%20Tomcat%20With%20a%20Database%20-%20Performance%20Optimization%20Tips&amp;notes=%0D%0A%0D%0AThe%20Internet%20is%20a%20great%20resource%2C%20but%20it%20is%20sometimes%20too%20much%20to%20wade%20through%20hundreds%20of%20web%20pages%20looking%20for%20tips%20about%20using%20Tomcat%20with%20a%20database.%20So%20we%20at%20Monitis%20have%20done%20it%20for%20you%21%20Below%20are%20some%20of%20the%20more%20useful%20tips%20found%20in%20vario" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/delicious.png" class="sociable-img sociable-hovers" title="del.icio.us" alt="del.icio.us" /></a><a rel="nofollow"   href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F24%2Fusing-tomcat-with-a-database-performance-optimization-tips%2F&amp;title=Using%20Tomcat%20With%20a%20Database%20-%20Performance%20Optimization%20Tips&amp;bodytext=%0D%0A%0D%0AThe%20Internet%20is%20a%20great%20resource%2C%20but%20it%20is%20sometimes%20too%20much%20to%20wade%20through%20hundreds%20of%20web%20pages%20looking%20for%20tips%20about%20using%20Tomcat%20with%20a%20database.%20So%20we%20at%20Monitis%20have%20done%20it%20for%20you%21%20Below%20are%20some%20of%20the%20more%20useful%20tips%20found%20in%20vario" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/digg.png" class="sociable-img sociable-hovers" title="Digg" alt="Digg" /></a><a rel="nofollow"   href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F24%2Fusing-tomcat-with-a-database-performance-optimization-tips%2F&amp;t=Using%20Tomcat%20With%20a%20Database%20-%20Performance%20Optimization%20Tips" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/facebook.png" class="sociable-img sociable-hovers" title="Facebook" alt="Facebook" /></a><a rel="nofollow"   href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F24%2Fusing-tomcat-with-a-database-performance-optimization-tips%2F&amp;title=Using%20Tomcat%20With%20a%20Database%20-%20Performance%20Optimization%20Tips&amp;source=Uptime+%26amp%3B+Performance+Tips+Tips+for+SysAdmin%2C+Webmaster%2C+Network+Admin&amp;summary=%0D%0A%0D%0AThe%20Internet%20is%20a%20great%20resource%2C%20but%20it%20is%20sometimes%20too%20much%20to%20wade%20through%20hundreds%20of%20web%20pages%20looking%20for%20tips%20about%20using%20Tomcat%20with%20a%20database.%20So%20we%20at%20Monitis%20have%20done%20it%20for%20you%21%20Below%20are%20some%20of%20the%20more%20useful%20tips%20found%20in%20vario" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/linkedin.png" class="sociable-img sociable-hovers" title="LinkedIn" alt="LinkedIn" /></a><a rel="nofollow"   href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F24%2Fusing-tomcat-with-a-database-performance-optimization-tips%2F&amp;Title=Using%20Tomcat%20With%20a%20Database%20-%20Performance%20Optimization%20Tips" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/blinklist.png" class="sociable-img sociable-hovers" title="BlinkList" alt="BlinkList" /></a><a rel="nofollow"   href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F24%2Fusing-tomcat-with-a-database-performance-optimization-tips%2F&amp;title=Using%20Tomcat%20With%20a%20Database%20-%20Performance%20Optimization%20Tips" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/dzone.png" class="sociable-img sociable-hovers" title="DZone" alt="DZone" /></a><a rel="nofollow"   href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F24%2Fusing-tomcat-with-a-database-performance-optimization-tips%2F&amp;title=Using%20Tomcat%20With%20a%20Database%20-%20Performance%20Optimization%20Tips&amp;annotation=%0D%0A%0D%0AThe%20Internet%20is%20a%20great%20resource%2C%20but%20it%20is%20sometimes%20too%20much%20to%20wade%20through%20hundreds%20of%20web%20pages%20looking%20for%20tips%20about%20using%20Tomcat%20with%20a%20database.%20So%20we%20at%20Monitis%20have%20done%20it%20for%20you%21%20Below%20are%20some%20of%20the%20more%20useful%20tips%20found%20in%20vario" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/googlebookmark.png" class="sociable-img sociable-hovers" title="Google Bookmarks" alt="Google Bookmarks" /></a><a rel="nofollow"   href="http://reddit.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F24%2Fusing-tomcat-with-a-database-performance-optimization-tips%2F&amp;title=Using%20Tomcat%20With%20a%20Database%20-%20Performance%20Optimization%20Tips" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/reddit.png" class="sociable-img sociable-hovers" title="Reddit" alt="Reddit" /></a><a rel="nofollow"   href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F24%2Fusing-tomcat-with-a-database-performance-optimization-tips%2F&amp;title=Using%20Tomcat%20With%20a%20Database%20-%20Performance%20Optimization%20Tips" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/stumbleupon.png" class="sociable-img sociable-hovers" title="StumbleUpon" alt="StumbleUpon" /></a><a rel="nofollow"   href="http://twitter.com/home?status=Using%20Tomcat%20With%20a%20Database%20-%20Performance%20Optimization%20Tips%20-%20http%3A%2F%2Fblog.monitis.com%2Findex.php%2F2012%2F01%2F24%2Fusing-tomcat-with-a-database-performance-optimization-tips%2F" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/twitter.png" class="sociable-img sociable-hovers" title="Twitter" alt="Twitter" /></a><a rel="nofollow"   href="http://blog.monitis.com/index.php/feed/" ><img src="http://blog.monitis.com/wp-content/plugins/sociable-30/pro/images/handycons/32/rss.png" class="sociable-img sociable-hovers" title="RSS" alt="RSS" /></a><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.monitis.com/index.php/2012/01/24/using-tomcat-with-a-database-performance-optimization-tips/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

