<?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>Carlos&#039; Corner &#187; ESX</title>
	<atom:link href="http://cars.lostroncos.org/tag/esx/feed/" rel="self" type="application/rss+xml" />
	<link>http://cars.lostroncos.org</link>
	<description>The tired geek-dad in the corner</description>
	<lastBuildDate>Wed, 12 May 2010 19:46:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Simulating a more interesting environment with Vyatta and VMware ESXi &#8211; pt 2</title>
		<link>http://cars.lostroncos.org/2010/02/18/a-more-interesting-environment-with-vyatta-and-vmware-pt2/</link>
		<comments>http://cars.lostroncos.org/2010/02/18/a-more-interesting-environment-with-vyatta-and-vmware-pt2/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 22:37:37 +0000</pubDate>
		<dc:creator>cars</dc:creator>
				<category><![CDATA[Home Lab]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[vyatta]]></category>
		<category><![CDATA[ESX]]></category>
		<category><![CDATA[esxi]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://cars.lostroncos.org/?p=343</guid>
		<description><![CDATA[<p>In an earlier post I went through the process of coming up with a solution to be able to test an Exchange 2003 to Exchange 2010 migration using VMs. In order to simulate a multi-site AD environment I wanted to use Vyatta based routers to create my network infrastructure. In this post I&#8217;ll actually walk [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://cars.lostroncos.org/2010/02/17/a-more-interesting-environment-with-vyatta-and-vmware/">In an earlier post</a> I went through the process of coming up with a solution to be able to test an Exchange 2003 to Exchange 2010 migration using VMs. In order to simulate a multi-site AD environment I wanted to use Vyatta based routers to create my network infrastructure. In this post I&#8217;ll actually walk through the process of setting up the ESX and theinternal router. In the next post(s) I&#8217;ll go into configuring the DMZ and internet routers and firewalls. As a reminder the environment I want to set up will look like this&#8230;</p>
<p><a rel="lightbox[100]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga8.png"><img class="alignnone size-medium wp-image-299" title="Final Environment" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga8-300x139.png" alt="Final Environment" width="300" height="139" /></a>.</p>
<p>In order to actually be able to implement this I first had to go configure the appropriate networking configuration on each of the ESXi hosts.</p>
<p>First I needed to create a virtual switch utilizing the NIC attached to the crossover cable. This is done by going to the &#8220;Configuration&#8221; tab for the ESX host within the vSphere Client.</p>
<p><a rel="lightbox[21]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part21.png"><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part21.png" alt="" width="535" height="176" /></a></p>
<p>Clicking the &#8220;Add Networking&#8221; option will walk one through the wizard to configure the new switch. I started by choosing &#8220;Virtual Machine&#8221; on the Connection Type Screen.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part22.png" alt="" /></p>
<p>On the next page I choose to create a new virtual switch and pick the appropriate physical NIC that will be used to communicate with the other host. (If I had the capacity to put all the VMs one one host I could create the vSwitch without having to specify a network adapter)</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part23.png" alt="" /></p>
<p>Then I created an initial Port Group and specified a VLAN ID for it. In this case for the Remote Site (192.168.3.X/24) I&#8217;m specifying VLAN ID 23.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part24.png" alt="" /></p>
<p>Once completed the new virtual switch should look similar to the one shown below.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part25.png" alt="" /></p>
<p>Now that the vSwitch has been created, I can add port groups for the other networks: DMZ (192.168.254.X), Internet (10.0.0.X) and HQ(192.168.2.X).  Each one of these should have a unique VLAN ID associated with it which is also used when these port groups get created on the second host.</p>
<p><span id="more-343"></span></p>
<p>In addition I need to add port groups for the network between the DMZ and Internet router (192.168.5.X), as well as the one between the internal router and the DMZ (192.168.4.X). Because I&#8217;ll put all three routers on the same host, these last two port groups need only exist on that one host.</p>
<p>When all is said and done there should be 6 port groups defined on the vSwitch on the host where I&#8217;ll put the routers and 4 port groups on the other host. Notice that the VLAN IDs for each network match up across the two switches.</p>
<p><a rel="lightbox[26]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part26.png"><img title="Completed vSwitch Configs" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part26.png" alt="" width="544" height="349" /></a></p>
<p>I initially tried this setup using an alpha version 6 of Vyatta but the routers felt a little slow to me (though I have no empirical evidence to back that up) so I went back to using version 5 LiveCDs for the routers as discussed in the earlier entry.</p>
<h2>Building the internal router</h2>
<p>I started by creating a custom VM for the internal or home router with 4 network adapters configured. I used the custom configuration because this VM won&#8217;t actually have a virtual hard disk. The four network adapters will be attached to my home LAN (lostroncos_01), the HQ Site Network, the Remote Site Network and the intranet to DMZ network. (Note: <a href="http://cars.lostroncos.org/2008/09/18/using-vyatta-with-vmware/">This post has a more detailed description</a> of the process I used to create Vyatta routers. )</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part27.png" alt="" /></p>
<p>After powering on the router and opening the VM console I like to enable the NIC on my home network and ssh so I can do the rest of the configuration via an ssh client such as Putty. Once the VM has initially been powered on, I can go back and look at the settings and determine the MAC address of the NIC attached to my home network (lostroncos_01) is 00:0c:29:76:e2:07. Upon logging into the VM console I can go into configure mode by entering the command &#8220;configure&#8221; and then get a list of the interfaces the router knows about by entering &#8220;show interfaces&#8221;.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part28.png" alt="" /><br />
The one I&#8217;m interested in initially configuring is eth0. I can tell because the MAC matches the one I took note of earlier. To configure it to use 192.168.1.254 as it&#8217;s address and enable ssh I can do the following:</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part29.png" alt="" /></p>
<p>Let&#8217;s look at these commands in a little more detail.</p>
<p>The  set interfaces command can take a wide variety of arguments. Here I&#8217;m specifying that I want to work on an ethernet interface. Other interface types include adsl, bonding, bridge, loopback, multilink, openvpn, serial, tunnel and wirelessmodem.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part210.png" alt="" /></p>
<p>Even after specifying the type as <strong><em>ethernet</em></strong> and the particular interface (eth0) I can still use one of several subcommands/options.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part211.png" alt="" /></p>
<p>Because I&#8217;m using VMs and a fairly generic setup I really only need to worry about the <strong><em>address</em></strong> option. So I specify the address and netmask notation by specifying the number of bits to use for the netmask (24).</p>
<p>The next command <strong><em>&#8220;set service ssh</em></strong>&#8221; simply enables the SSH server.</p>
<p>Now I&#8217;ve configured the interface and enabled SSH, but the settings haven&#8217;t been made active. That&#8217;s what the<strong><em> &#8220;commit&#8221;</em></strong> command does.</p>
<p>Executing the &#8220;<strong><em>show interfaces</em></strong>&#8221; command again I can see that the IP(v4) address is set for eth0 but not any of the other interfaces. Now I can use my ssh client to connect to the VM to finish the configuration. (One can also use the VMware console to perform all of the configuration steps, I just prefer an external SSH client).</p>
<p>After making sure the MAC addresses and networks match up the way I think they should, I can set the address for each of the other interfaces and commit the changes. Then I can exit the configuration mode by typing &#8220;<strong><em>exit</em></strong>&#8221; and save the configuration to the virtual floppy using the &#8220;<strong><em>init-floppy</em></strong>&#8221; command.  This then ensures that my configuration will survive reboots of the router.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part212.png" alt="" /></p>
<p>One of the other things than can be helpful to do is to use the &#8220;<strong><em>description</em></strong>&#8221; option with  set interfacse to provide a little more information when logged into the router.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part213.png" alt="" /></p>
<p>After doing this for each interface and then committing the changes I can see the descriptions when doing show interfaces from either the configure mode</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part214.png" alt="" /></p>
<p>Or from the actual router shell</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part215.png" alt="" /></p>
<p>Since I happen to  already have VMs on both the HQ and Remote networks I can verify basic connectivity from the router by pinging those VMs as well as my PC.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part216.png" alt="" /></p>
<p>The next trick is to validate that I can ping the HQ and Remote subnets from my physical PC. Since both of those subnets are directly connected to the router I don&#8217;t need to add any static routes on the router. However I do need to add a route on my PC to reach those subnets. Otherwise it&#8217;ll try to use the default gateway out to my ISP (as shown below) which doesn&#8217;t know anything about this lab environment.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part217.png" alt="" /></p>
<p>To reach the 192.168.[2,3,4] subnets I want to use the interface on rtr-home that&#8217;s attached to my home network (192.168.1.254). So using the &#8220;<strong><em>route</em></strong>&#8221; command from a command prompt on my Windows7 machine I can add the route to 192.168.4.X.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part218.png" alt="" /></p>
<p>The route command in this case takes a few arguments…</p>
<p style="margin-left: 27pt">#1 <strong><em>add </em></strong>tells route I&#8217;m adding a new one</p>
<p style="margin-left: 27pt">#2 Next I specify the destination, and since ultimately I&#8217;m trying to get to a subnet we&#8217;ll specify <strong><em>192.168.4.0</em></strong>.</p>
<p style="margin-left: 27pt">#3 &amp; #4 <strong><em>MASK </em></strong>says the next argument is the netmask relative to the destination</p>
<p style="margin-left: 27pt">#5 is the gateway for this destination, in this case the interface on my virtual router that&#8217;s attached to the home network.</p>
<p>Once that&#8217;s done I can then try to ping &amp; tracert the 192.168.4.2 interface on the router again.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part219.png" alt="" /><br />
<img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part220.png" alt="" /></p>
<p>Executing the <strong><em>&#8220;route print&#8221;</em></strong> command from the Command Prompt  I can see the entry for the 192.168.4.X network as I would expect.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part221.png" alt="" /></p>
<p>Now that this particular routing entry appears to be working properly I can re-run the route command with the <strong><em>-p</em></strong> option so that it&#8217;s persistent across reboots of my home PC.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part222.png" alt="" /><br />
Next I need to add routes for the 192.168.2.X and 192.168.3.X networks to the PC as well.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part223.png" alt="" /></p>
<p>At this point, I can try to do a traceroute from my PC to the VM on the HQ Site network that I was able to ping earlier from the router.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part224.png" alt="" /><br />
Because I&#8217;m occasionally paranoid, the next step for me was to connect to the console of the VMs on the HQ (shown below) and Remote (not shown) subnets and verify that I can ping machines on my home LAN across the internal router, rtr-home.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_2236_Part225.png" alt="" /></p>
<p>At this point my internal Vyatta router is routing traffic between subnets it is directly connected to (Home LAN, the HQ Site and Remote Site). Once the DMZ and Internet routers are set up some changes will need to be made on the internal router to get traffic to those non-connected subnets. I&#8217;ll go through that process in a subsequent post.</p>
<p>-crt</p>
]]></content:encoded>
			<wfw:commentRss>http://cars.lostroncos.org/2010/02/18/a-more-interesting-environment-with-vyatta-and-vmware-pt2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Simulating a more interesting environment with Vyatta and VMware ESXi</title>
		<link>http://cars.lostroncos.org/2010/02/17/a-more-interesting-environment-with-vyatta-and-vmware/</link>
		<comments>http://cars.lostroncos.org/2010/02/17/a-more-interesting-environment-with-vyatta-and-vmware/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 07:05:08 +0000</pubDate>
		<dc:creator>cars</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Home Lab]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[vyatta]]></category>
		<category><![CDATA[ESX]]></category>
		<category><![CDATA[esxi]]></category>
		<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://cars.lostroncos.org/?p=300</guid>
		<description><![CDATA[<p>[Part 2 of this series which involves the actual configuration of the Vyatta routers is now up here -crt]</p>
<p>At work we&#8217;ve recently made the decision to migrate to Exchange 2010 from Exchange 2003. While we do have an environment that we can use for some testing of the migration it doesn&#8217;t mimic our production environment [...]]]></description>
			<content:encoded><![CDATA[<p><em>[Part 2 of this series which involves the actual configuration of the Vyatta routers is</em><a href="http://cars.lostroncos.org/2010/02/18/a-more-interesting-environment-with-vyatta-and-vmware-pt2/"><em> now up here</em></a><em> -crt]</em></p>
<p>At work we&#8217;ve recently made the decision to migrate to Exchange 2010 from Exchange 2003. While we do have an environment that we can use for some testing of the migration it doesn&#8217;t mimic our production environment closely enough for me to be comfortable using it as the sole test area. Given the changes in how Exchange 2010 (E2KX) works vs 2003 I wanted to be able to simulate multiple (2) Active Directory sites (i.e. subnets), a DMZ, and the &#8220;Internet&#8221; including some really simple firewalls.</p>
<p>I wanted to use virtual machines to go through this exercise so that I could take snapshots and repeat the various steps and/or variations of them if necessary. In order to do this I utilized the Vyatta Community Edition based routers to help create my virtual &#8220;enterprise&#8221; environment. I&#8217;ve talked about<a href="http://cars.lostroncos.org/2008/09/18/using-vyatta-with-vmware/" target="_blank"> Vyatta before in this article</a>. In this post I&#8217;ll talk a little about the process I went through to get to my final configuration (shown below).  In subsequent articles I&#8217;ll go  through the actual router and VMware configuration process.</p>
<div id="attachment_299" class="wp-caption alignnone" style="width: 830px"><a rel="lightbox[8]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga8.png"><img class="size-large wp-image-299" title="Final Environment" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga8-1024x477.png" alt="Final Environment" width="820" height="382" /></a><p class="wp-caption-text">The final environment as laid out on two interconnected servers</p></div>My lab environment at home consists of two Dell PowerEdge servers (one a PE2850, the other a 2950 each with 8Gigs of RAM). Both servers are running ESXi 4.0. Since the 2850 can&#8217;t run 64 bit VMs I was going to install the Exchange 2003 servers and Windows 2003 DCs on it. Then I&#8217;d install VMs running Server 2008R2 on the 2950 with Exchange 2010. Both servers are connected to my home network and since I was going to be using both I wanted to have some way for VMs on each host to be able to communicate with others without necessarily having all the traffic come across my home network. Since both Dells have multiple NICs I connected them with a crossover cable ending up with something like this:</p>
<p><div class="wp-caption alignnone" style="width: 504px"><img title="A physical view" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga1.png" alt="" width="494" height="384" /><p class="wp-caption-text">Physical view of the network </p></div>
<p>In initially penciling out a plan for what I wanted to do I had nine VMs scattered across four subnets.</p>
<div class="wp-caption alignnone" style="width: 706px"><a rel="lightbox[2]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga2.png"><img title="Multi-gateway subnets" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga2.png" alt="" width="696" height="332" /></a><p class="wp-caption-text">Isolated environment with multiple gateways per subnet</p></div>Considering my limited resources and my need to keep some other unrelated VMs up and running while I&#8217;m testing, I trimmed this down to 7 by combining the Domain Controllers and Exchange 2003 servers together in the HQ and Remote subnets.</p>
<p><div class="wp-caption alignnone" style="width: 443px"><img title="Consolidating functions to reduce # of VMs" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga3.png" alt="" width="433" height="387" /><p class="wp-caption-text">Consolidating functions to reduce # of VMs</p></div>
<p>In further looking at this from a networking perspective, I was hit with the realization the initial configuration with two routers attached to the HQ and DMZ subnets would require me to manage routing on<strong><em> each individual VM</em></strong> in each of those subnets as well as on each of the routers. As an example one can look at the Exchange 2010 server in the HQ site/subnet.</p>
<p><img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga4.png" alt="" /></p>
<p><span id="more-300"></span></p>
<p>In this particular case the Exchange server would need to be able to route some traffic to the DMZ via 192.168.2.253 and other traffic to the &#8220;Remote&#8221; site via 192.168.2.254. (If the server was going to communicate directly with machines in our fake &#8220;Internet&#8221; I&#8217;d have to add yet another routing entry.) I can of course configure a default gateway when configuring the NIC, but still have to manually add a route for the other gateway. This process then has to be repeated on each machine. It then gets more complicated if I want to be able to use Terminal Services (RDP) to connect to the VMs rather than using the VM remote console because I now have to figure out how to connect the virtual routers to my home network and potentially add yet another routing entry.</p>
<p>I decided I&#8217;d rather have a single gateway on each subnet (so I only had to specify a default gateway on each VM) and then rely on the routers to do all the routing. I considered a couple of different ways to do this. One option was do something &#8220;meshy&#8221; where the router for each subnet was connected to common shared subnet.</p>
<p><a rel="lightbox[5]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga5.png"><img title="A &quot;mesh-y&quot; solution" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga5.png" alt="" width="591" height="378" /></a></p>
<p>This would have had the desired effect a single gateway for each subnet regardless of where traffic was going, but would have required 5 virtual routers which seemed a little excessive. Going in the other direction, another option was to have a single router connected to everything.</p>
<div class="wp-caption alignnone" style="width: 626px"><a rel="lightbox[6]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga6.png"><img title="Single-router solution" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga6.png" alt="" width="616" height="336" /></a><p class="wp-caption-text">Single-router solution</p></div><a rel="lightbox[6]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga6.png"><br />
</a></p>
<p>I ended up with a solution somewhere between the &#8220;mesh&#8221; and the single mongo router. It employs three routers. I decided on this partly because I wanted to keep things relatively simple especially since I was going to be enabling the firewall functionality between the DMZ and Internet (and wanting to limit the damage I could do to myself when working late at night).<br />
<a rel="lightbox[7]" href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga7.png"><br />
<img src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga7.png" alt="" width="649" height="317" /></a></p>
<p>Again, when all was said and done the environment I ended up with looks like the one below. In the next couple of entries I&#8217;ll go through the actual process of building the networking side of this.</p>
<p><div class="wp-caption alignnone" style="width: 784px"><a href="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga8.png"><img title="Physical/Logical view" src="http://cars.lostroncos.org/wp-content/uploads/2010/02/021810_0704_Simulatinga8.png" alt="" width="774" height="361" /></a><p class="wp-caption-text">Physical/Logical view</p></div>
]]></content:encoded>
			<wfw:commentRss>http://cars.lostroncos.org/2010/02/17/a-more-interesting-environment-with-vyatta-and-vmware/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Nagios ESX3i Scripts and ESX4i</title>
		<link>http://cars.lostroncos.org/2009/06/29/nagios-esx3i-scripts-and-esx4i/</link>
		<comments>http://cars.lostroncos.org/2009/06/29/nagios-esx3i-scripts-and-esx4i/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 22:57:09 +0000</pubDate>
		<dc:creator>cars</dc:creator>
				<category><![CDATA[NAgios]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[3i]]></category>
		<category><![CDATA[4i]]></category>
		<category><![CDATA[ESX]]></category>
		<category><![CDATA[esx3i]]></category>
		<category><![CDATA[esx4i]]></category>
		<category><![CDATA[esxi]]></category>

		<guid isPermaLink="false">http://cars.lostroncos.org/?p=193</guid>
		<description><![CDATA[<p>This is just an update, but the scripts I wrote for use with Nagios and ESX3i seem to work just fine with ESX4i (at least in my home lab environment using Dell Poweredge 2850s).</p>
]]></description>
			<content:encoded><![CDATA[<p>This is just an update, but the <a href="http://cars.lostroncos.org/2008/03/07/updated-esx-3i-scripts-for-nagios/">scripts I wrote for use with Nagios and ESX3i</a> seem to work just fine with ESX4i (at least in my home lab environment using Dell Poweredge 2850s).</p>
]]></content:encoded>
			<wfw:commentRss>http://cars.lostroncos.org/2009/06/29/nagios-esx3i-scripts-and-esx4i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Monitoring Items in Zabbix for Nagios plugins &#8211; part 1 (Log data)</title>
		<link>http://cars.lostroncos.org/2008/04/03/creating-monitoring-items-in-zabbix-for-nagios-plugins-part-1-log-data/</link>
		<comments>http://cars.lostroncos.org/2008/04/03/creating-monitoring-items-in-zabbix-for-nagios-plugins-part-1-log-data/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 05:11:12 +0000</pubDate>
		<dc:creator>cars</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[zabbix]]></category>
		<category><![CDATA[3i]]></category>
		<category><![CDATA[ESX]]></category>
		<category><![CDATA[external check]]></category>

		<guid isPermaLink="false">http://cars.lostroncos.org/2008/04/03/creating-monitoring-items-in-zabbix-for-nagios-plugins-part-1-log-data/</guid>
		<description><![CDATA[<p style="margin-left: 1pt">One of the things I wanted to check in looking at Zabbix was how hard it would be to use the Nagios plugins I wrote/modified for monitoring ESX 3i in Zabbix.</p>
<p style="margin-left: 1pt">It turns out that they are usable pretty much as is though there is a minor modification that needs to be [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-left: 1pt">One of the things I wanted to check in looking at Zabbix was how hard it would be to use the <a href="http://cars.lostroncos.org/2008/03/07/updated-esx-3i-scripts-for-nagios/">Nagios plugins</a> I wrote/modified for monitoring ESX 3i in Zabbix.</p>
<p style="margin-left: 1pt">It turns out that they are usable pretty much as is though there is a minor modification that needs to be made on how they accept/expect parameters. There are however a couple of ways to approach setting them up. Zabbix supports maintaining a couple of different kinds of data for external checks (as well as in general). These include:</p>
<ul>
<li>
<p style="margin-left: 28pt">Float</p>
</li>
<li>
<p style="margin-left: 28pt">Integer</p>
</li>
<li>
<p style="margin-left: 28pt">Text</p>
</li>
<li>
<p style="margin-left: 28pt">Log</p>
</li>
<li>
<p style="margin-left: 28pt">Character</p>
</li>
</ul>
<p style="margin-left: 1pt">The Nagios plugins I &#8216;m concerned in looking at will probably work with either the Log type or Integer. The external check &#8220;Item&#8221; type is just that a check. In and of itself it doesn&#8217;t make anything happen in terms of alerting or notifications. For that we need to set up &#8220;Triggers.&#8221; I&#8217;ll cover setting up an Item using Log type data in this post.</p>
<p style="margin-left: 1pt"><span id="more-76"></span></p>
<p style="margin-left: 1pt">I&#8217;ve created a template in Zabbix for my 3i boxes to which I&#8217;ll be attaching these &#8220;Items&#8221; so that they&#8217;re available for anything built off this template.</p>
<p style="margin-left: 1pt">To start we&#8217;ll need to log into the Zabbix web console, select &#8220;Configuration&#8221; and then Items. Then we need to narrow down object we&#8217;re working on using the Group and Host dropdowns. Here I&#8217;ve used the group GO_ESX and the template Template_GO_ESX_3i. Next click &#8220;Create Item&#8221;</p>
<p style="margin-left: 1pt"><img src="http://cars.lostroncos.org/wp-content/uploads/2008/04/040408-0510-creatingmon1.png" /><span style="font-size: 12pt; font-family: Times New Roman"><br />
</span></p>
<p style="margin-left: 1pt"><img src="http://cars.lostroncos.org/wp-content/uploads/2008/04/040408-0510-creatingmon2.png" /><span style="font-size: 12pt; font-family: Times New Roman"><br />
</span></p>
<p style="margin-left: 1pt">We need to fill in the &#8220;description&#8221; field with something meaningful to us. In this case we&#8217;re going to be using the script <strong><em>check_3i_sensors</em></strong> which returns info about the various sensors in the machine (of particular interest are the power supplies and their redundancy) So we&#8217;ll use &#8220;Check 3i Sensors&#8221; as the description. The &#8220;Type&#8221; needs to be changed to External Check. The key in this case is actually the name of the script to run and any parameters. For external checks the format is:</p>
<p style="margin-left: 28pt">Script(parameters)</p>
<p style="margin-left: 28pt">Where:</p>
<p style="margin-left: 55pt">script &#8211; is the name of the script</p>
<p style="margin-left: 55pt">Parameters is the list of command line parameters</p>
<p style="margin-left: 1pt">Zabbix will execute the script from the directory specified by the ExternalScripts option in zabbix_server.conf. (By default this /etc/zabbix/externalscripts) Zabbix will add the hostname as the first parameter and then append the list specified in the (parameters) piece of the definition. As an example:</p>
<table border="0" style="border-collapse: collapse">
<tr>
<td style="border: #a3a3a3 1pt solid; padding: 5px"><span style="font-size: 10pt">Example 1: </span></td>
<td style="border-right: #a3a3a3 1pt solid; border-top: #a3a3a3 1pt solid; border-left: medium none; border-bottom: #a3a3a3 1pt solid; padding: 5px"><span style="font-size: 10pt">Execute script check_oracle.sh with parameters &#8220;-h 192.168.1.4&#8243;.<br />
</span><span style="font-size: 10pt">Host name &#8216;www1.company.com&#8217;.</span></td>
</tr>
</table>
<p style="margin-left: 28pt"><span style="font-size: 10pt; font-family: Courier New">check_oracle.sh[-h 192.168.1.4]<br />
</span></p>
<p style="margin-left: 28pt"><span style="font-size: 10pt">ZABBIX will execute:<br />
</span></p>
<p style="margin-left: 28pt"><span style="font-size: 10pt; font-family: Courier New">check_oracle.sh www1.company.com -h 192.168.1.4.<br />
</span></p>
<p style="margin-left: 28pt">&nbsp;</p>
<p style="margin-left: 1pt"><em>[ Here is where one of the drawbacks of Zabbix appears when compared to Nagios. I haven't yet found a way to alter the parameters that are sent to the script on a per host basis. It is of course possible to set up the checks on each host rather than using the template, but the template should in theory be used to save us some of that repetitive work. If we were to go forward with this it ought to be possible to automate the process. If we define our process to include creating a monitoring user on each ESX host with the same name and password then using the template becomes much more feasible ]<br />
</em></p>
<p style="margin-left: 1pt">So for the sensors script we would enter the following for the key: check_3i_sensors( &#8211;username zabbix &#8211;password zabbix)</p>
<p style="margin-left: 1pt">Since zabbix already includes the hostname for us we don&#8217;t need to specify it. (But this is where the modification to the nagios plugins becomes necessary to properly handle the way the argument is passed) On my test ESX 3i server I&#8217;ve created a local user called &#8216;zabbix&#8217; which has read-only privileges to use for connecting and running the external check.</p>
<p style="margin-left: 1pt">In the &#8220;Type of information&#8221; field select &#8220;Log&#8221; via the dropdown menu. This will cause the fields on the screen to change. Specify a value for the update interval (I usually use 60 seconds) and any flexible intervals if necessary as well as the number of days to keep history and trend data (see image below) Then click the &#8220;Save&#8221; button.</p>
<p style="margin-left: 1pt"><img src="http://cars.lostroncos.org/wp-content/uploads/2008/04/040408-0510-creatingmon3.png" /><span style="font-size: 12pt; font-family: Times New Roman"><br />
</span></p>
<p style="margin-left: 1pt">This needs to be repeated for any other plugins that are applicable to the template. As show below I&#8217;ve created two External checks, one for Sensor data, one for Storage status.</p>
<p style="margin-left: 1pt"><img src="http://cars.lostroncos.org/wp-content/uploads/2008/04/040408-0510-creatingmon4.png" /><span style="font-size: 12pt; font-family: Times New Roman"><br />
</span></p>
<p style="margin-left: 1pt">Next you&#8217;ll need to create a host based on your template. Here I&#8217;ve created a host call &#8220;Steve_ESX_2950&#8243; based on the template. Next if you wait a few minutes and then go the &#8220;Monitoring&#8221; tab and select overview (and if necessary narrow down the show servers to see your new host) you should see something like the image below:</p>
<p style="margin-left: 1pt"><img src="http://cars.lostroncos.org/wp-content/uploads/2008/04/040408-0510-creatingmon5.png" /><span style="font-size: 12pt; font-family: Times New Roman"><br />
</span></p>
<p style="margin-left: 1pt">Looking at this we can tell out external check has run and in this particular case it appears the sensor status is &#8220;GREEN&#8221;. If you click on the field you can see the last couple of hundred values for that particular item. You&#8217;ll notice the &#8220;Severity&#8221; is not classified. What we need to do next (in the next post) is to set up a trigger based on the Value of the Item (i.e. when it&#8217;s not &#8220;Green&#8221;).</p>
<p style="margin-left: 1pt"><img src="http://cars.lostroncos.org/wp-content/uploads/2008/04/040408-0510-creatingmon6.png" /><span style="font-size: 12pt; font-family: Times New Roman"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://cars.lostroncos.org/2008/04/03/creating-monitoring-items-in-zabbix-for-nagios-plugins-part-1-log-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
