<?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>Parkingdenied &#187; LDAP</title>
	<atom:link href="http://www.parkingdenied.com/tag/ldap/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.parkingdenied.com</link>
	<description>Redline is just a suggestion</description>
	<lastBuildDate>Wed, 26 Oct 2011 14:15:31 +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>First CactiWMI release! (0.0.3)</title>
		<link>http://www.parkingdenied.com/2008/12/24/first-cactiwmi-release-003/</link>
		<comments>http://www.parkingdenied.com/2008/12/24/first-cactiwmi-release-003/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 10:25:39 +0000</pubDate>
		<dc:creator>Ross</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Cacti]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[WMI]]></category>

		<guid isPermaLink="false">http://www.parkingdenied.com/?p=98</guid>
		<description><![CDATA[Yer yer I know it&#8217;s not the first actual release but it&#8217;s the first one I am posting up publicly. CactiWMI is the project I have been working on as a method to monitor Windows servers and applications such as Exchange and SQL from a Linux based Cacti install. To do this it uses a [...]]]></description>
			<content:encoded><![CDATA[<p>Yer yer I know it&#8217;s not the first actual release but it&#8217;s the first one I am posting up publicly.</p>
<p>CactiWMI is the project I have been working on as a method to monitor Windows servers and applications such as Exchange and SQL from a Linux based Cacti install. To do this it uses a combination of some PHP scripting and the WMI client for Linux which just so happens to be available as a Debian package <img src='http://www.parkingdenied.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Anyway I&#8217;ve posted up some previous examples of what can be done and they were pretty rough. So here are a few examples of what can be done and what templates are available in the package.</p>
<p>Here we can monitor memory usage, this one showing the physical memory usage compared against the commit limit and the current commited bytes.</p>
<p><img class="alignnone size-full wp-image-97" title="002-windows-memory" src="http://www.parkingdenied.com/wp-content/uploads/2008/12/002-windows-memory.png" alt="002-windows-memory" width="703" height="241" /></p>
<p>Simple disk space monitor. It also does not suffer from the SNMP remapping problem where when you add a new disk the OID&#8217;s are remapped and thus your stats break.</p>
<p><img class="alignnone size-full wp-image-96" title="002-windows-diskspace" src="http://www.parkingdenied.com/wp-content/uploads/2008/12/002-windows-diskspace.png" alt="002-windows-diskspace" width="703" height="227" /></p>
<p>Pretty straight forward, disk I/O so you can see what is really going on when you have load problems.</p>
<p><img class="alignnone size-full wp-image-95" title="002-windows-diskio" src="http://www.parkingdenied.com/wp-content/uploads/2008/12/002-windows-diskio.png" alt="002-windows-diskio" width="703" height="241" /></p>
<p>CPU usage, available with templates for 1, 2 and 4 core machines. I will do one for an 8 core machine shortly.</p>
<p><img class="alignnone size-full wp-image-94" title="002-windows-cpu" src="http://www.parkingdenied.com/wp-content/uploads/2008/12/002-windows-cpu.png" alt="002-windows-cpu" width="703" height="255" /></p>
<p>SQL performance. Tested against SQL 2005.</p>
<p><img class="alignnone size-full wp-image-93" title="002-sql-performance" src="http://www.parkingdenied.com/wp-content/uploads/2008/12/002-sql-performance.png" alt="002-sql-performance" width="703" height="227" /></p>
<p>Domain controller LDAP stats. If you use a lot of query based distribution groups or use LDAP for external authentication this can be invaluable to see when there are performance problems.</p>
<p><img class="alignnone size-full wp-image-92" title="002-ntds-ldap-connections" src="http://www.parkingdenied.com/wp-content/uploads/2008/12/002-ntds-ldap-connections.png" alt="002-ntds-ldap-connections" width="703" height="255" /></p>
<p><img class="alignnone size-full wp-image-91" title="002-ntds-ldap" src="http://www.parkingdenied.com/wp-content/uploads/2008/12/002-ntds-ldap.png" alt="002-ntds-ldap" width="687" height="269" /></p>
<p>NT Domain Controller stats. Both authentications per second as well as the read/write/searches against your domain. Good for performance troubleshooting and detecting rogue applications.</p>
<p><img class="alignnone size-full wp-image-90" title="002-ntds-ds" src="http://www.parkingdenied.com/wp-content/uploads/2008/12/002-ntds-ds.png" alt="002-ntds-ds" width="703" height="255" /></p>
<p><img class="alignnone size-full wp-image-89" title="002-ntds-auth" src="http://www.parkingdenied.com/wp-content/uploads/2008/12/002-ntds-auth.png" alt="002-ntds-auth" width="703" height="241" /></p>
<p>Pretty useful no?</p>
<p>So how to set them up&#8230; Grab the package attached to this post. It will contain two PHP scripts and a number of templates. Extract the two files to your Cacti scripts folder and then start editing the wmi-logins.php file. In this file are listed the username/password pairs which are referenced by the script. This separates the credential itself from Cacti meaning your Cacti admins don&#8217;t actually need to know your WMI user which you are using to pull the stats. In any case add the credential as per the file which should be pretty self explanitory.</p>
<p>Before we go too much further there are some gotcha&#8217;s that need to be taken care of regarding the user you have selected to do the WMI queries. This user needs to both have access to remotely query WMI but also to be able to query the subsystems from WMI. What this means in our case is that the user needs have remote access to WMI, be allowed to remote query and then also to be allowed to access perfmon. From my understanding this is due to perfmon being a subsystem which WMI is accessing and thus the credential being used must also have access to the perfmon counters in order to be able to graph anything. For the WMI portion of things you can get most of the information from this MSDN link <a href="http://msdn2.microsoft.com/en-us/library/aa393266.aspx" target="_blank">http://msdn2.microsoft.com/en-us/library/aa393266.aspx</a>. The basics are you grant the user permission to remote WMI as discussed, you then need to grant the user access to the appropriate WMI namespace, in our case this is CIMV2 and then add the user to the perfmon group which by default the 2003 server and up machines should have. This should grant it all the permission it requires, however if you do have problems test with an admin credential and see if you get results. If you do get results as admin but not as your non-admin user then you have a permission issue.</p>
<p>Ok so thats out of the way now you may need to update the wmi.php file to ensure the correct path to your wmic binary so edit that and ensure it is correct. Additionally you can redirect the location of the wmi-logins.php by editing the appropriate variable. Most of the code should be commented to help explain what it is doing, basically its acting as the glue between Cacti and the wmic results. So everything is in place, all that you need to do is import the templates included and attach them to the hosts you want to graph. The slack way I have been doing things is simply adding the graph to the device or the host template which will auto generate the required data sources when you add the graph however your more than welcome to do the the manual way by adding the data source and then the graph and linking the two. Make sure if you used a different credential name to update the data templates as I have not set them to be a per data source credential reference, you will understand once you take a look. It&#8217;s up to you if you need the ability to do per data source credentials for different servers but the option is there should it need to be enabled.</p>
<p>So that should cover everything, add your graphs and start monitoring those hosts! If there are any questions feel free to leave a comment or drop me a PM on the Cacti forums <img src='http://www.parkingdenied.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
Note: There is a file embedded within this post, please visit this post to download the file.
]]></content:encoded>
			<wfw:commentRss>http://www.parkingdenied.com/2008/12/24/first-cactiwmi-release-003/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

