<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5790759226714314260</id><updated>2011-11-27T17:44:23.851-07:00</updated><category term='monitoring'/><category term='zabbix'/><category term='perfmon'/><category term='service'/><category term='cluster'/><title type='text'>Dave is a Geek</title><subtitle type='html'>Greetings, fellow geeks.  I have created this blog as a virtual landfill for geeky knowledge that may be of interest to other geeks.  Some posts will be general, others very specific, but hopefully each will be useful to at least someone.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://daveisageek.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5790759226714314260/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://daveisageek.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>big.bald.dave</name><uri>http://www.blogger.com/profile/13646641500838911732</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_1ak5p-ZeEAY/SIDXY_0mu2I/AAAAAAAAACE/TuaxwahY61c/S220/MeAndEve.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5790759226714314260.post-3832578487110539265</id><published>2008-11-29T09:16:00.006-07:00</published><updated>2008-11-29T10:04:49.446-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='service'/><category scheme='http://www.blogger.com/atom/ns#' term='zabbix'/><category scheme='http://www.blogger.com/atom/ns#' term='cluster'/><category scheme='http://www.blogger.com/atom/ns#' term='monitoring'/><category scheme='http://www.blogger.com/atom/ns#' term='perfmon'/><title type='text'>Installing the Zabbix Agent on a Windows Cluster</title><content type='html'>For the uninitiated, &lt;a href="http://www.zabbix.com/"&gt;Zabbix&lt;/a&gt; is a fabulous enterprise-class, cross-platform, open-source distributed monitoring solution.  One sets up a collection server with a MySQL database, then installs agents on each client machine to enable feature-rich monitoring of various metrics.  On Windows clients, this means basic metrics like free disk space, CPU usage, etc.; any counter available in Performance Monitor; and custom scripts.&lt;br /&gt;&lt;br /&gt;Installing the Zabbix agent on a Windows cluster is unfortunately quite involved.  Because Windows initializes Performance Monitor metrics for all members of a cluster, but only the active node actually reports the metrics for a specific Cluster Group, you need a Zabbix agent that is specific to each Cluster Group.  And since the Zabbix agent installs as a service with a specific name, you are required to manually create services for each Cluster Group.&lt;br /&gt;&lt;br /&gt;To install the Zabbix monitoring agent on a multi-instance (formerly known as active/active) Windows Server 2003 cluster, you must install the Zabbix agent service several times.&lt;br /&gt;Each physical node should have an agent running to monitor physical components (e.g. CPU, memory, network, local disk). Agents on the physical nodes are to be installed using the normal, systematic installation process.&lt;br /&gt;&lt;br /&gt;Each cluster group should have an agent running as a clustered Generic Service resource, monitoring that cluster group's resources (e.g. clustered disk resources, SQL Server, other clustered services). Agents for each cluster group are to be installed manually by using the Service Control command-line program on each physical node and creating Generic Service resources.&lt;br /&gt;&lt;br /&gt;In a clustered environment, between zero and many cluster groups may be owned by one physical node at any given time. Since the Zabbix agent listens on a TCP port, care must be taken to eliminate the possibility of more than one agent listening on the same port on the same IP address on the same physical node at the same time. Therefore, each individual agent must bind to a TCP port (default is 10050) on a unique IP address.  This is accomplished via the ListenIP parameter in the agent configuration file.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note&lt;/span&gt;: for this example, the following names will be used:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;First physical node: PhysicalNode1.MyDomain.com (192.168.0.1)&lt;/li&gt;&lt;li&gt;Second physical node: PhysicalNode2.MyDomain.com (192.168.0.2)&lt;/li&gt;&lt;li&gt;First cluster group: ClusterGroup1.MyDomain.com (192.168.0.3)&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Physical node installation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First, copy &lt;span style="font-style: italic;"&gt;zabbix_agentd.exe&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;zabbix_agentd.conf&lt;/span&gt; to &lt;span style="font-style: italic;"&gt;c:\Zabbix\PhysicalNode1&lt;/span&gt;.  Then edit &lt;span style="font-style: italic;"&gt;c:\Zabbix\PhysicalNode1\zabbix_agentd.conf&lt;/span&gt;, modifying the following parameters:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Hostname: &lt;span style="font-style: italic;"&gt;PhysicalNode1.MyDomain.com&lt;/span&gt;&lt;/li&gt;&lt;li&gt;ListenIP: &lt;span style="font-style: italic;"&gt;192.168.0.1&lt;/span&gt;&lt;/li&gt;&lt;li&gt;ListenPort: &lt;span style="font-style: italic;"&gt;10050&lt;/span&gt;&lt;/li&gt;&lt;li&gt;LogFile: &lt;span style="font-style: italic;"&gt;c:\Zabbix\PhysicalNode1\zabbix_agentd.log&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;From a command line, install the Zabbix agent as a service by executing this command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;c:\Zabbix\PhysicalNode1\zabbix_agentd.conf -i -c c:\Zabbix\zabbix_agentd.conf&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Repeat these steps on PhysicalNode2, using the respective hostname, IP Address, and logging directory.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Cluster Group installation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First, copy &lt;span style="font-style: italic;"&gt;zabbix_agentd.exe&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;zabbix_agentd.conf&lt;/span&gt; to &lt;span style="font-style: italic;"&gt;c:\Zabbix\ClusterGroup1&lt;/span&gt; on the first physical node (&lt;span style="font-style: italic;"&gt;PhysicalNode1&lt;/span&gt;).  Then edit &lt;span style="font-style: italic;"&gt;c:\Zabbix\&lt;/span&gt;&lt;span style="font-style: italic;"&gt;ClusterGroup1&lt;/span&gt;&lt;span style="font-style: italic;"&gt;\zabbix_agentd.conf&lt;/span&gt;, modifying the following parameters:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Hostname: &lt;span style="font-style: italic;"&gt;ClusterGroup1&lt;/span&gt;&lt;span style="font-style: italic;"&gt;.MyDomain.com&lt;/span&gt;&lt;/li&gt;&lt;li&gt;ListenIP: &lt;span style="font-style: italic;"&gt;192.168.0.3&lt;/span&gt;&lt;/li&gt;&lt;li&gt;ListenPort: &lt;span style="font-style: italic;"&gt;10050&lt;/span&gt;&lt;/li&gt;&lt;li&gt;LogFile: &lt;span style="font-style: italic;"&gt;c:\Zabbix\&lt;/span&gt;&lt;span style="font-style: italic;"&gt;ClusterGroup1&lt;/span&gt;&lt;span style="font-style: italic;"&gt;\zabbix_agentd.log&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Using zabbix_agentd.exe to install the second service does not work because the service tries to install itself with the same service name (&lt;span style="font-style: italic;"&gt;ZABBIX Agent&lt;/span&gt;).  Therefore, you must manually create the service with the Windows command-line utility &lt;a href="http://support.microsoft.com/kb/251192"&gt;sc.exe&lt;/a&gt;.  To create the service for ClusterGroup1, execute the following command from any directory:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;sc \\PhysicalNode1 create "ZABBIX Agent (ClusterGroup1)" binpath= "C:\Zabbix\ClusterGroup1\zabbix_agentd.exe --config c:\zabbix\ClusterGroup1\zabbix_agentd.conf" DisplayName= "ZABBIX Agent (ClusterGroup1)"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note the display name - this is what allows the service to be created with a different name.  After executing this command, you can open up the Services applet in MMC and see that the new service has been created.&lt;br /&gt;&lt;br /&gt;Now, execute all of these steps again on all of the physcial nodes of the cluster that can host this particular Cluster Group.  Once this is done, you can create the Generic Service Cluster Resource that will allow the Zabbix agent to monitor ClusterGroup1.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Creating the Cluster Resource&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Start Cluster Administrator on any of the physical nodes.  Right click on &lt;span style="font-style: italic;"&gt;ClusterGroup1&lt;/span&gt;, and click New &gt; Resource.  On the New Resource screen, enter the name - &lt;span style="font-style: italic;"&gt;Zabbix Agent (ClusterGroup1)&lt;/span&gt; - and select the resource type &lt;span style="font-style: italic;"&gt;Generic Service&lt;/span&gt;.  On the next screen, allow all physical nodes to be possible owners that are possible owners of the other resources in the group.  On the dependencies screen, add only the Cluster Group's IP address.  On the Generic Service Parameters screen, enter the service name &lt;span style="font-style: italic;"&gt;ZABBIX Agent (ClusterGroup1)&lt;/span&gt;.  Note that this is the same name you used in the call to &lt;span style="font-style: italic;"&gt;sc.exe&lt;/span&gt;.  Do not enter any registry keys to be replicated, and you should be done.  Bring the new clustered resource online, and test that it successfully fails over to another physical node by right-clicking on &lt;span style="font-style: italic;"&gt;ClusterGroup1 &lt;/span&gt;and clicking &lt;span style="font-style: italic;"&gt;Move Group&lt;/span&gt;.&lt;span style="font-style: italic;"&gt;  &lt;/span&gt;Watch the&lt;span style="font-style: italic;"&gt; c:\Zabbix\ClusterGroup1\zabbix_agentd.log &lt;/span&gt;on the current physical node to make sure there are no errors, and you're done!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Configuring Zabbix&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now create separate hosts in Zabbix for each physical node (to monitor the health of the physical machines) and for each cluster node, and start monitoring!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5790759226714314260-3832578487110539265?l=daveisageek.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://daveisageek.blogspot.com/feeds/3832578487110539265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://daveisageek.blogspot.com/2008/11/installing-zabbix-agent-on-windows.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5790759226714314260/posts/default/3832578487110539265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5790759226714314260/posts/default/3832578487110539265'/><link rel='alternate' type='text/html' href='http://daveisageek.blogspot.com/2008/11/installing-zabbix-agent-on-windows.html' title='Installing the Zabbix Agent on a Windows Cluster'/><author><name>big.bald.dave</name><uri>http://www.blogger.com/profile/13646641500838911732</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_1ak5p-ZeEAY/SIDXY_0mu2I/AAAAAAAAACE/TuaxwahY61c/S220/MeAndEve.jpg'/></author><thr:total>3</thr:total></entry></feed>
