<?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>Andrew Farley</title>
	<atom:link href="http://andrewfarley.com/feed" rel="self" type="application/rss+xml" />
	<link>http://andrewfarley.com</link>
	<description>Sysadmin, PHP, Linux and Mac OS-X - The Ramblings of a Nerd</description>
	<lastBuildDate>Thu, 28 Oct 2010 02:01:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Time Capsule dead, time to void the warranty!</title>
		<link>http://andrewfarley.com/mac/time-capsule-dead-time-to-void-the-warranty</link>
		<comments>http://andrewfarley.com/mac/time-capsule-dead-time-to-void-the-warranty#comments</comments>
		<pubDate>Sat, 26 Jun 2010 22:00:46 +0000</pubDate>
		<dc:creator>Andrew Farley</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[2tb]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[brick]]></category>
		<category><![CDATA[fan mod]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[lapastenague]]></category>
		<category><![CDATA[mod]]></category>
		<category><![CDATA[molex]]></category>
		<category><![CDATA[os-x]]></category>
		<category><![CDATA[picopsu]]></category>
		<category><![CDATA[solder]]></category>
		<category><![CDATA[time capsule]]></category>
		<category><![CDATA[western digital green]]></category>

		<guid isPermaLink="false">http://andrewfarley.com/?p=305</guid>
		<description><![CDATA[What do you do when your time capsule dies... well... I ripped mine open, replaced the power supply, made the fan always run, and upgraded the HDD to 2TB!  :)  Click through to the article for the full details and gory screenshots.]]></description>
			<content:encoded><![CDATA[<p><strong><em>July 10, 2010 Update</em></strong><em>: Apple _just_ decided to support/fix any dead Time Capsules.  While, you won&#8217;t gain an expanded hard drive, or fan mod, you will not void your warranty, see &#8211; </em><a href="http://support.apple.com/kb/TS3351"><em>http://support.apple.com/kb/TS3351</em></a></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>So, just my luck&#8230; recently my Apple 500G Time Capsule died.  After some quick googling I find this <a href="http://www.computerworld.com/s/article/9139367/Dying_Apple_Time_Capsules_spark_complaints">is</a> <a href="http://forums.cnet.com/5208-21579_102-0.html?threadID=355994">a</a> <a href="http://discussions.apple.com/thread.jspa?threadID=2091667&amp;tstart=0">very</a> <a href="http://www.geek.com/articles/apple/apple-time-capsules-dying-by-the-droves-after-18-months-20091012/">common</a> <a href="http://digg.com/apple/Dying_Apple_Time_Capsules_rile_users">problem</a>.  I went to my local Apple store and there was nothing they could do for me, I didn&#8217;t have Apple care and they couldn&#8217;t guarantee my data.  &#8221;It would be a few hundred dollars to fix, you might as well buy a new one&#8221; the Apple genius told me.  Damn you Apple and your &#8220;<a title="Server-Grade Storage" href="http://store.apple.com/us/product/MC343LL/A/Time-Capsule-1TB">Server-grade storage</a>&#8220; claims!  This is what I get for not using a <a href="http://lmgtfy.com/?q=wrt54g">WRT54g</a>.  Well, I figured it was time to void my warranty like I do with everything else!  Yay (in a non-sarcastic way)!</p>
<h2>Mod #1: Fix Time Capsule, replace power supply</h2>
<p>Thanks to some pioneers such as <a href="http://sites.google.com/site/lapastenague/">LaPastenague</a> (<a href="http://sites.google.com/site/lapastenague/a-deconstruction-of-routers-and-modems/apple-time-capsule-repair/apple-time-capsule-fan-mod">fan mod</a>, <a href="http://sites.google.com/site/lapastenague/a-deconstruction-of-routers-and-modems/apple-time-capsule-repair">power supply mod</a>) they&#8217;ve found the flaws to be in the power supply inside the Time Capsule, and usually that the hard drives and CPUs are perfectly intact!  With some brief testing I found this to be the case for me, but I found the suggested solution (mounting a female Molex connector in the Time Capsule) to be very tacky so off into my piles of random crap I go searching&#8230; and look what I stumble upon&#8230;</p>
<p style="text-align: center;"><img class="size-full wp-image-370  aligncenter" title="PicoPSU - DC-DC ATX Power Supply" src="http://andrewfarley.com/wp-content/uploads/2010/06/pico-psu.png" alt="" width="600" height="316" /></p>
<p style="text-align: center;"><a title="Mini-box.com PicoPSU" href="http://www.mini-box.com/s.nl/it.A/id.417/.f" target="_blank">$39.95 &#8211; PicoPSU ATX DC-DC Power Supply (mini-box.com)</a></p>
<p>That is a PicoPSU, an ATX DC-DC Power Supply that takes 12V input and outputs 12v and 5v, and it&#8217;s rated at above the output amperage of the old internal power supply. You can find it at the link above, or search on mini-box.com.  Not only that, but this came with a external power supply adapter that fits perfectly into the existing power port on the Time Capsule as seen here.</p>
<p style="text-align: center;"><img class="size-thumbnail wp-image-347 aligncenter" title="New Time Capsule Power Connector" src="http://andrewfarley.com/wp-content/uploads/2010/06/new-tc-power-connector-325x263.png" alt="" width="325" height="263" /></p>
<p>Now the soldering I had to do (thus far) is to unsolder the existing power adapters for the motherboard and hard drive from the dead power supply and solder it to an adapter for the PicoPSU, which looked something like this&#8230;</p>
<p style="text-align: center;"><img class="size-thumbnail wp-image-348 aligncenter" title="Time Capsule New Power Supply Solders" src="http://andrewfarley.com/wp-content/uploads/2010/06/new-power-supply-solders-325x239.png" alt="" width="325" height="239" /></p>
<p>Keep in mind since this power supply has an ATX connector I had to <a href="http://www.duxcw.com/faq/ps/ps4.htm">jump the two pins</a> to make this power supply always on when connected to power.</p>
<p style="text-align: center;"><img class="size-full wp-image-352  aligncenter" title="PicoPSU ATX Jumper" src="http://andrewfarley.com/wp-content/uploads/2010/06/atx-jumper.png" alt="" width="350" height="266" /></p>
<p>I plugged it up to see if it would work&#8230; it looked like this&#8230;</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-349" title="Time Capsule New Power Supply, First Run" src="http://andrewfarley.com/wp-content/uploads/2010/06/time-capsule-new-power-supply-first-try.png" alt="" width="603" height="340" /></p>
<p>Lo and behold, it worked!  All my data was there, so I quickly backed up all my data to a external drive and shut it down again.  I figured heck, if I have my Time Capsule open I might as well hack it as far as it can go.  It&#8217;s already got a voided warranty, so why the heck not.</p>
<h2>Mod #2: Maximize Storage Space</h2>
<table>
<tbody>
<tr>
<td>So the first mod I did (besides fixing my power supply) was to upgrade the hard drive.  This is a trivial thing to do once your Time Capsule is open.  Literally just swap the drive, the actual Time Capsule OS is stored on Flash Memory on the device.  So out comes the 500G drive and in goes a new sexy and <em>quiet</em> 2TB Western Digital Green Drive.  NOTE: There is a temperature sensor on the old drive underneath some padded tape.  I pulled this tape up, and then removed the temperature sensor and screws from the old drive.  I screwed the screws onto the new drive, and stuck the temperature sensor on the new drive also.   Note: This sensor I found to be obsolete by my third mod (fan mod), but here&#8217;s a interesting fact&#8230; if you leave this sensor disconnected while the Time Capsule is running it complains about overheating, so I guess it defaults to &#8220;hot&#8221; if it can&#8217;t detect the temperature, so might as well just plug it up.  Regardless, if you have a fully working Time Capsule that you don&#8217;t mind voiding the warranty, feel free to do this if you want more space it&#8217;s a simple, effective mod.  Once you upgrade the hard drive you just have to use the Airport Utility and Erase the new drive and it&#8217;s ready to go!</td>
<td><img class="alignright size-thumbnail wp-image-309" title="2TB SATA Western Digital Green" src="http://andrewfarley.com/wp-content/uploads/2010/06/t2b1_sm-225x325.jpg" alt="" width="135" height="195" /></td>
</tr>
</tbody>
</table>
<h2>Mod #3: Make fan always-on at reduced RPM with increased circulation</h2>
<p>By default, the Time Capsule ONLY turns on the fan when the hard drive gets REALLY hot and there is no air inlet.  I found this (as others did) to be a very poor design, as the processor and (original) PSU also generated tons of heat which was not being detected by their placement of the sensor.  When I put the Time Capsule back together and tested it, even though the green drive runs a bit cooler, with less power, and the power supply is now external it was STILL running hot.  So, I went ahead and did the fan mod that everyone does.  I took some insight from LaPastenague&#8217;s site, but also some ideas (wiring) from the <a href="http://appletimecapsule.me/TimeCapsule_Fix/Solution__Before_it_Breaks.html">appletimecapsule.me tutorial</a> and  <a href="http://naterhomeprojects.blogspot.com/2010/04/in-my-opinion-apples-time-capsule-is.html">Nate&#8217;s tutorial</a>.  I ended up first ripping out the on/off cable (pin 3) by unsoldering it on the base of the fan, and pulling the cable out of the motherboard connector completely.  I tried the fan it in this configuration&#8230; the fan ran LOUD and excessively fast, especially for the new cooler hard drive and external power brick/supply.</p>
<p>So, next I wired a 33ohm resistor on the 5v line to restrict how much power it received, and therefore how much air flow it pushed and how loud it was.  Many others (tutorials above) mention this is about the sweet spot, and I totally confirm it, it&#8217;s perfect.  Now my device while the hard drive is being used is luke-warm to the touch, and while it&#8217;s not in use it is about room temperature and the fan is barely audible only if I go up to the device and listen for it.  <em>Perfect!</em></p>
<p style="text-align: center;"><img class="size-full wp-image-356  aligncenter" title="AppleTV Fan Connector, Always-On Explained" src="http://andrewfarley.com/wp-content/uploads/2010/06/fan-connector.png" alt="" width="350" height="242" /><img class="aligncenter size-full wp-image-355" title="Apple TV Fan 5V Resistor" src="http://andrewfarley.com/wp-content/uploads/2010/06/5v-resistor.png" alt="" width="150" height="330" /></p>
<p>Finally, I did what everyone else does and cut a hole in the bottom of my time capsule for air intake, and taped close the inside inlet for the fan, so the air is pulled from outside and pushed sideways into the Time Capsule, as seen below, this gives some great circulation for the Time Capsule and keeps it just above room temperature.</p>
<p style="text-align: center;"><img class="size-full wp-image-360  aligncenter" title="Time Capsule - Fan Cutout" src="http://andrewfarley.com/wp-content/uploads/2010/06/fan-cutout.png" alt="" width="400" height="335" /></p>
<p style="text-align: center;">And since this was going inside the Time Capsule I wrapped the PicoPSU generously with electrical tape, didn&#8217;t want it touching the motherboard in any way, that would be&#8230; bad.  So this is what it looks like&#8230;<br />
<img class="aligncenter size-full wp-image-361" title="Time Capsule - With PicoPSU Installed" src="http://andrewfarley.com/wp-content/uploads/2010/06/new-time-capsule-power-supply.png" alt="" width="603" height="453" /></p>
<p style="text-align: center;">And here&#8217;s a good overhead with the fan attached and taped, and the fan resistor all taped up.<br />
<img class="aligncenter size-full wp-image-362" title="Time Capsule - Finished with PicoPSU and Fan Mod" src="http://andrewfarley.com/wp-content/uploads/2010/06/time-capsule-finished.png" alt="" width="603" height="423" /></p>
<p>And this is what it looks like from the bottom when it&#8217;s all back together, yes I know, no fan grate.  But honestly, this is in a very safe/clean environment and location.  I will eventually add a grate though when I get around to it.</p>
<p style="text-align: center;"><img class="size-full wp-image-375  aligncenter" title="Time Capsule - Bottom Fan Inlet" src="http://andrewfarley.com/wp-content/uploads/2010/06/bottom-fan-tc.png" alt="" width="600" height="271" /></p>
<p style="text-align: center;">And here&#8217;s what it looks like all back together!  Looks sexy, eh?  Better than a Molex sticking out&#8230;  ;)<br />
<img class="aligncenter size-full wp-image-363" title="Time Capsule - Back together, looks sexy!" src="http://andrewfarley.com/wp-content/uploads/2010/06/TC-Done.png" alt="" width="603" height="406" /></p>
<h2><strong>Wrap-up Notes: I&#8217;m a happy camper, but this isn&#8217;t for everyone&#8230;</strong></h2>
<p>With the Time Capsule all back together, now it requires a external brick power supply, which is better for the device since the heat is mostly external now, and the fan is always on instead of just coming on when it gets way too hot which I really like.  Additionally, if I ever need to replace the power supply again it&#8217;ll be a simple swap-in, and now I can enjoy the 2TB of massive storage (although Apple now sells a <a title="1TB/2TB Time Capsule" href="http://store.apple.com/us/product/MC343LL/A/Time-Capsule-1TB" target="_blank">2TB Time Capsule</a>).</p>
<p>This is definitely not for the faint of heart or the unexperienced hardware hacker or solderer but it could just give your old Time Capsule some new life, or it could be a cheap way to get yourself a Time Capsule!  You could buy an older 250/500GB model online at a cheap price, a quick search on craigslist in my area I found two working ones for around $140/ea.  You could get even it cheaper if it was dead and the original owner has no hope/interest in trying to fix it like this.  For only an additional $39 for the power supply and $120 for the 2TB HDD and a little elbow grease, you&#8217;re looking at a cheap way to get a great storage unit and router that&#8217;s very friendly with the Macs (and PCs) in your network.</p>
<p>I hope you enjoyed my article, thanks again to all the people that have pioneered this front and make this information publicly available, I&#8217;m just continuing the trend.  Cheers!</p>
<h2>Overall Max Difficulty: 4/10  (1 easy / 10 very hard)</h2>
<ol>
<li><strong>1/10 &#8211; </strong>Opening the device is pretty easy, I found that I ripped the bottom up a little bit, and mine was old enough that there was no stickieness remaining.  To re-attach I just used a very small amount of some craft-glue and let it dry for 24 hours.  There are 10 screws you have to take off, but it&#8217;s all pretty simple.</li>
<li><strong>2/10</strong> &#8211; Swapping the drive is simple, the only reason it gets a 2 instead of 1 is because opening this thing is a bit of work, especially for just swapping the drive.</li>
<li><strong>3/10</strong> &#8211; Cutting the fan hole for intake, this was pretty trivial to do as long as you have the right tool and you&#8217;re not afraid to use it.  Getting the fan back on those rubber grommets is really annoying, and/or getting the grommets back in the holes on the TC is annoying.  Not hard, just time consuming.</li>
<li><strong>4/10</strong> &#8211; Making fan always-on low-rpm modifications were still relatively simple, rip out one cable, and solder a resistor in-line in the power line.  The cables are much finer and more delicate and there&#8217;s not tons of cable to spare, you have to get this right on the first (or second) time or you&#8217;re out of cable.  If you skipped the resistor this would only be 2/10, but your fan would run really fast and it&#8217;s pretty loud (go ahead, try it).</li>
<li><strong>4/10</strong> &#8211; Unsoldering the power supply connectors from the old power supply was a bit challenging, and handling a power supply that is possibly not discharged can be dangerous.  I didn&#8217;t have to discharge the caps possibly because it had been left unplugged for a month.  I left the power supply intact and just unsoldered the 3 cables I needed from it and tossed the original power supply.  I found that around 600deg on my solder (Weller WESD51) plus a generous helping of adding solder helped heat the entire connector up enough to pull them out.  Do one at a time, and heat and add solder generously.</li>
<li><strong>2/10</strong> &#8211; Soldering the PicoPSU cable to the now-unsoldered cable.  This was cake as long as you&#8217;ve soldered two things together before.  They&#8217;re both very big wires/connectors, so it&#8217;s simple!</li>
<li><strong>1/10 &#8211; </strong>Putting it back together is easy, it&#8217;s really not possible to put anything back wrong.  If you did all the mods I did above, just make sure to generously protect any metal from hitting the motherboard by taping or cable-wrapping.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://andrewfarley.com/mac/time-capsule-dead-time-to-void-the-warranty/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Zabbix RPMs Updated to 1.8.1 in my repository</title>
		<link>http://andrewfarley.com/sysadmin/zabbix-rpms-updated-to-1-8-1-in-my-repository</link>
		<comments>http://andrewfarley.com/sysadmin/zabbix-rpms-updated-to-1-8-1-in-my-repository#comments</comments>
		<pubDate>Tue, 02 Feb 2010 22:40:15 +0000</pubDate>
		<dc:creator>Andrew Farley</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Zabbix]]></category>
		<category><![CDATA[ipmi]]></category>
		<category><![CDATA[jabber]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[spec]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[yum update]]></category>
		<category><![CDATA[zabbix 1.8.1]]></category>

		<guid isPermaLink="false">http://andrewfarley.com/?p=285</guid>
		<description><![CDATA[I just updated the CentOS RPMs and spec file in my repository for Zabbix 1.8.  This is a minor version bump to 1.8.1 of Zabbix.  See their changelog for changes to Zabbix.  Also, I added some new features based on requests from users&#8230;

IPMI Support
Jabber support
NOTE (corrected): SSH did not make it into [...]]]></description>
			<content:encoded><![CDATA[<p>I just updated the CentOS RPMs and spec file in my repository for Zabbix 1.8.  This is a minor version bump to 1.8.1 of Zabbix.  See their <a href="http://www.zabbix.com/rn1.8.1.php" target="_blank">changelog</a> for changes to Zabbix.  Also, I added some new features based on requests from users&#8230;</p>
<ol>
<li>IPMI Support</li>
<li>Jabber support</li>
<li><strong>NOTE (corrected)</strong>: SSH did not make it into this one, I will package it in the next release</li>
</ol>
<p>NOTE: If you have problems installing zabbix-web because of the PHP >= 5.2 dependency, please visit this  link: <a href="http://www.zabbix.com/forum/showpost.php?p=54836&#038;postcount=7">PHP >= 5.2 requirements for zabbix-web</a></p>
<p>All you need to do if you have my repository is run `yum update` to upgrade your packages, if you don&#8217;t know about it  yet, visit the link below for more info on my repository!  :)</p>
<p> &nbsp; Article links: </p>
<ol>
<li><a href="http://andrewfarley.com/sysadmin/rpm-repository-online">My Yum RPM Repository</a></li>
<li><a href="http://repo.andrewfarley.com/centos/specs/zabbix.spec">Zabbix 1.8.1 RPM Spec File</a></li>
<li><a href="http://andrewfarley.com/sysadmin/zabbix-rpms-updated">Zabbix 1.8r5 Previous RPM update</a></li>
<li><a href="http://www.zabbix.com/forum/showpost.php?p=54836&#038;postcount=7">PHP >= 5.2 requirements for zabbix-web</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://andrewfarley.com/sysadmin/zabbix-rpms-updated-to-1-8-1-in-my-repository/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Adding an administrative user to OS-X via the terminal</title>
		<link>http://andrewfarley.com/mac/new-user-via-the-terminal</link>
		<comments>http://andrewfarley.com/mac/new-user-via-the-terminal#comments</comments>
		<pubDate>Fri, 15 Jan 2010 11:38:07 +0000</pubDate>
		<dc:creator>Andrew Farley</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[add group]]></category>
		<category><![CDATA[add user]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[dscl]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://andrewfarley.com/?p=238</guid>
		<description><![CDATA[So, I tend to do a lot of lower-level stuff on OS-X such as compiling my own PostgreSQL server for development and testing purposes.  One of the things that tends to interrupt the process of actually trying to run postgres is that it cannot change to the postgres user and it cannot run it as [...]]]></description>
			<content:encoded><![CDATA[<p>So, I tend to do a lot of lower-level stuff on OS-X such as compiling my own <a title="PostgreSQL Database Server" href="http://www.postgresql.org/" target="_blank">PostgreSQL server</a> for development and testing purposes.  One of the things that tends to interrupt the process of actually trying to run postgres is that it cannot change to the postgres user and it cannot run it as root.</p>
<p>In order to accomplish this you could make a user with your System Preferences which I have done in the past, the problem is then every time you log into your computer you&#8217;ll see this postgres user for no reason.  Ugh, I hate that.  So to work around this you just have to run the following commands in your OS-X terminal to add a group and user for postgres, with the user &#8220;home&#8221; being the default compilation target directory for PostgreSQL (/usr/local/pgsql)</p>
<pre><script type="syntaxhighlighter" class="brush: bash"><![CDATA[
sudo dscl . -create /Groups/postgres
sudo dscl . -create /Groups/postgres RealName 'PostgreSQL Server'
sudo dscl . -create /Groups/postgres PrimaryGroupID 43
sudo dscl . -create /Groups/postgres UserShell /usr/bin/false
sudo dscl . -create /Groups/postgres Password '*'
sudo dscl . -create /Groups/postgres NFSHomeDirectory /var/empty
sudo dscl . -create /Users/postgres
sudo dscl . -create /Users/postgres Password '*'
sudo dscl . -create /Users/postgres RealName 'PostgreSQL Server'
sudo dscl . -create /Users/postgres PrimaryGroupID 43
sudo dscl . -create /Users/postgres UniqueID 43
sudo dscl . -create /Users/postgres UserShell /usr/bin/false
sudo dscl . -create /Users/postgres NFSHomeDirectory /usr/local/pgsql
</script></pre>
<p>This is confirmed to work on every version of Leopard and Snow Leopard.</p>
<p>Cheers and enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewfarley.com/mac/new-user-via-the-terminal/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zabbix RPMs Updated in my repository (1.8r5)</title>
		<link>http://andrewfarley.com/sysadmin/zabbix-rpms-updated</link>
		<comments>http://andrewfarley.com/sysadmin/zabbix-rpms-updated#comments</comments>
		<pubDate>Sat, 09 Jan 2010 03:06:11 +0000</pubDate>
		<dc:creator>Andrew Farley</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Zabbix]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[repo]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[zabbix-proxy]]></category>

		<guid isPermaLink="false">http://andrewfarley.com/?p=252</guid>
		<description><![CDATA[Thanks to your feedback, and a patch (thanks Tom) I just updated the CentOS RPMs and spec file in my repository for Zabbix 1.8.  Rev. 5 of the Zabbix RPMs adds&#8230;

Zabbix-Proxy RPM
LibCURL support (web scenarios work now)
Fixed x86_64 repo (was missing repodata)
Package upgrade issue (thanks Tom for catching this)
Fixed some file permissions (thanks ericgearhart)
Added [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to your feedback, and a patch (thanks Tom) I just updated the CentOS RPMs and spec file in my repository for Zabbix 1.8.  Rev. 5 of the Zabbix RPMs adds&#8230;</p>
<ol>
<li>Zabbix-Proxy RPM</li>
<li>LibCURL support (web scenarios work now)</li>
<li>Fixed x86_64 repo (was missing repodata)</li>
<li>Package upgrade issue (thanks Tom for catching this)</li>
<li>Fixed some file permissions (thanks ericgearhart)</li>
<li>Added all necessary buildRequirements to specfile</li>
</ol>
<p>Go upgrade your packages, if you don&#8217;t know much about it, visit the link below for my repository!  :)</p>
<p> &nbsp; Article links: </p>
<ol>
<li><a href="http://repo.andrewfarley.com/centos/specs/zabbix.spec">Zabbix 1.8r5 RPM Spec File</a></li>
<li><a href="http://andrewfarley.com/sysadmin/rpm-repository-online">My Yum RPM Repository</a></li>
<li><a href="http://www.zabbix.com/forum/showthread.php?p=57037">Zabbix Forums post regarding my Zabbix RPMs</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://andrewfarley.com/sysadmin/zabbix-rpms-updated/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>SVN Post-Commit Automatic Email</title>
		<link>http://andrewfarley.com/sysadmin/svn-commit-automatic-email</link>
		<comments>http://andrewfarley.com/sysadmin/svn-commit-automatic-email#comments</comments>
		<pubDate>Fri, 08 Jan 2010 02:27:42 +0000</pubDate>
		<dc:creator>Andrew Farley</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[post-commit]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[scm]]></category>
		<category><![CDATA[source code management]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://andrewfarley.com/?p=241</guid>
		<description><![CDATA[A popular method of communicating to fellow team members that you committed data to a subversion repository is to send an automatic email out to all users of that repository.  I developed a simple two-script method that is extensible and easy to implement [...]]]></description>
			<content:encoded><![CDATA[<p>A popular method of communicating to fellow team members that you committed data to a subversion repository is to send an automatic email out to all users of that repository.  I developed a simple two-script method that is extensible and easy to implement.</p>
<p>First, somewhere relevant to your repositories make a &#8220;scripts&#8221; folder.  This is generally where I store all my svn-pre/post scripts.  I put mine in /srv/svn/scripts (my other repositories are in /srv/svn).  In this new folder create a new file called svn_email_commit.sh with the following contents.</p>
<pre><script type="syntaxhighlighter" class="brush: bash"><![CDATA[
#!/bin/bash
REPOS=$1
REV=$2
SENDTO=$3
SENDFROM=svncommit@andrewfarley.com

LIMITDIFF=200
CHANGELOG=`svnlook log -r $REV $REPOS`
AUTHOR=`svnlook author -r $REV $REPOS`
CHANGED=`svnlook changed -r $REV $REPOS`
DIFF=`svnlook diff -r $REV $REPOS | head --lines=$LIMITDIFF`
DATE=`date`
TMPFILE=/tmp/svn$REV-$RANDOM.message

SUBJECT="SVNCommit ($AUTHOR) $REPOS [$REV]"
echo "-------------------- SVN Commit Notification --------------------
Repository: $REPOS
Revision:   $REV
Author:     $AUTHOR
Date:       $DATE

-----------------------------------------------------------------
Log Message:
-----------------------------------------------------------------
$CHANGELOG

-----------------------------------------------------------------
Changes:
-----------------------------------------------------------------
$CHANGED

-----------------------------------------------------------------
Diff: (only first $LIMITDIFF lines shown)
-----------------------------------------------------------------
$DIFF
" > $TMPFILE

# Send email
cat $TMPFILE | mail -a "From: $SENDFROM" -s "$SUBJECT" "$SENDTO"

# Cleanup
rm $TMPFILE
</script></pre>
<p>Then navigate to your repository root and go into the hooks folder.  In there, create a file called post-commit with the following contents&#8230;</p>
<pre><script type="syntaxhighlighter" class="brush: bash"><![CDATA[
#!/bin/sh
REPOS="$1"
REV="$2"
SENDTO="you@yourwebsite.com, another_guy@hiswebsite.com"

# Send it to these people, calling the script we created above
/srv/svn/scripts/svn_email_commit.sh "$REPOS" "$REV" "$SENDTO"
</script></pre>
<p>And that's it!  :)  Don't forget to chmod +x both of the files above though.  Now every time someone commits if they are in the SENDTO field of the post-commit script, they'll get emailed!</p>
<p>The reason I do this in two scripts instead of one is so for each of my repositories I can specify different emails.  This helps in a server environment with many repositories with different projects and varying team members, clients or contractors working on the project.  </p>
<p><strong>NOTE</strong>: You need to put this post-commit file into the hooks folder of each repository that you want emails from.</p>
<p>If you have any problems, please don't hesitate to leave some comments and I'll make edits where necessary.  This above works perfectly (with the right software installed) on Ubuntu, Gentoo, and CentOS.</p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewfarley.com/sysadmin/svn-commit-automatic-email/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Using raw disks/partitions from VMWare Fusion</title>
		<link>http://andrewfarley.com/mac/raw-disks-from-vmware-fusion</link>
		<comments>http://andrewfarley.com/mac/raw-disks-from-vmware-fusion#comments</comments>
		<pubDate>Tue, 29 Dec 2009 07:37:12 +0000</pubDate>
		<dc:creator>Andrew Farley</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[partition]]></category>
		<category><![CDATA[raw disk]]></category>
		<category><![CDATA[rawDiskCreator]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[vmware fusion]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://andrewfarley.com/?p=197</guid>
		<description><![CDATA[One thing that bugs the hell out of me is when a seemingly simple task isn't so, especially on the Mac.  For example, I use VMWare Fusion on my Mac and I can't add a raw partition or disk to any of my VMs.  So, for example I can't plug up a USB hard drive to my Mac with a partition formatted with Reiser-FS and directly mount that partition in a virtual machine.  But, through some googling around and some trial and error I figured out how to do it.  This tutorial isn't for the faint of heart, but if you're comfortable with a terminal in OS-X you'll be fine. [...]]]></description>
			<content:encoded><![CDATA[<p>One thing that bugs the hell out of me is when a seemingly simple task isn&#8217;t so, especially on the Mac.  For example, I use VMWare Fusion on my Mac and I can&#8217;t add a raw partition or disk to any of my VMs.  So, for example I can&#8217;t plug up a USB hard drive to my Mac with a partition formatted with Reiser-FS and directly mount that partition in a virtual machine.  But, through some googling around and some trial and error I figured out how to do it.  This tutorial isn&#8217;t for the faint of heart, but if you&#8217;re comfortable with a terminal in OS-X you&#8217;ll be fine.</p>
<p>First thing that you need to do is find out the name of the raw disk you want to use.  To do this, startup your OS-X Disk Utility application (/Applications/Utilities/Disk Utility.app).  Once inside, control-click on the device that you want to use on the left, and select Information OR click on the disk and hit CMD-I OR click on it and go to the File Menu, and select Get Info.  Control clicking should look like&#8230;</p>
<p><a rel="attachment wp-att-178" href="http://andrewfarley.com/mac/raw-disks-from-vmware-fusion/attachment/disk-utility-disk-information"><img class="size-full wp-image-178 " title="OSX Disk Utility - Get Info" src="http://andrewfarley.com/wp-content/uploads/2009/12/disk-utility-disk-information.png" alt="OSX Disk Utility - Get Info" width="506" height="298" /></a></p>
<p>Next, you&#8217;re looking for what it says under Disk Identifier, seen below highlighted in red.</p>
<p><a rel="attachment wp-att-179" href="http://andrewfarley.com/mac/raw-disks-from-vmware-fusion/attachment/osx-disk-utility-get-info-identifier"><img class="size-full wp-image-179 " title="OSX Disk Utility - Get Info Disk Identifier" src="http://andrewfarley.com/wp-content/uploads/2009/12/osx-disk-utility-get-info-identifier.png" alt="OSX Disk Utility - Get Info Disk Identifier" width="468" height="312" /></a></p>
<p>You&#8217;ll see in my example above  I am looking at <strong>disk4</strong>.  This is IMPORTANT to remember for the commands below&#8230; now, you need to decide which partition you want to use, and we&#8217;ll need the Terminal for this.  Run the following command, replacing disk4 with whatever disk identifier your disk has.</p>
<blockquote><p>sudo /Library/Application\ Support/VMware\ Fusion/vmware-rawdiskCreator print /dev/disk4</p></blockquote>
<p>That command should ask for your password, and the results should look something like (although yours WILL be different) the following&#8230;</p>
<blockquote><p>Nr      Start       Size Type Id Sytem<br />
&#8211; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;- &#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
1         63     401562 BIOS 83 Linux<br />
2     401625    3919860 BIOS 82 Linux swap<br />
3    4321485   73834740 BIOS 83 Linux</p></blockquote>
<p>The above is a typical Linux installation with a 200MB boot partition (partition 1), swap (partition 2) and the root (/) partition (partition 3).  This particular example I am doing because I wanted to backup all the files on this disk before reformatting it.  So I want to grab the root partition, which is partition 3 on this list.  You need to use this partition number in the next command to actually create your raw disk for VMWare Fusion to use&#8230;</p>
<blockquote><p>sudo /Library/Application\ Support/VMware\ Fusion/vmware-rawdiskCreator create /dev/disk4 3 /MyRawDisk4Partition3 lsilogic</p></blockquote>
<p>Unfortunately due to the fact that you need to run sudo for this command, the resulting files in the root of your OS-X install are now owned by root, with 600 (locked down) permissions.  You need to set your user as the owner to fix this problem&#8230;</p>
<blockquote><p>sudo chown yourunixusername /MyRawDisk4Partition3*</p></blockquote>
<p>NOTE: Replace the &#8220;yourunixusername&#8221; with your actual OS-X &#8220;short&#8221; unix user name.  This can be found by opening a new terminal and typing the command pwd.  It should show something like &#8220;/Users/afarley&#8221; making afarley my username.</p>
<p>You should have two files in your / partition named MyRawDisk4Partition3.vmdk and MyRawDisk4Partition3-pt.vmdk.</p>
<p>Now to put this virtual disk into one of your Virtual Machines, that was the point of this tutorial after all!  Problem is&#8230; Fusion isn&#8217;t very friendly about this.  When you create a raw disk device like this, it doesn&#8217;t let you just +(add) the device in the &#8220;<strong>Disks</strong>&#8221; settings area.  You must manually add it to the configuration file of the VM you want to add this disk to.  In my example I have a simple Linux VM with a single disk (bootcamp-partition) as a SCSI device.  So I need to add a second SCSI drive to this machine by adding the following to the configuration file.  Here is the procedure&#8230;</p>
<ol>
<li>First, make sure your VMWare Fusion application is not running (this is VERY important).</li>
<li>Second, navigate to your Virtual Machines folder where the configuration files are stored (typically ~/Documents/Virtual Machines.localized/).</li>
<li>Third, go into the folder that is the VM you want to edit.</li>
<li>Fourth, make a BACKUP of your configuration file (should be the only .vmx file in this folder) incase you mess it up, easiest way is to right-click on it and select duplicate, or just click on the .vmx file and hit CMD-D.  If you cannot see file extensions then you should enable them, or do this in the terminal.  Do NOT duplicate this whole folder, that would be a huge waste of space.</li>
<li>Fifth, open up this .vmx file in your favorite text editor!  Mine is TextMate.</li>
<li>Sixth, add the following lines to this file, preferably right after your scsi0:0 similar drive declaration.  Also, search through the rest of the .vmx file for &#8217;scsi0:1.present = &#8220;FALSE&#8221;&#8216;. Usually by default they have this somewhere littered towards the end of the config file. Just delete this entry since you have it set to true in the additions above.</li>
</ol>
<blockquote><p>scsi0:1.present = &#8220;TRUE&#8221;<br />
scsi0:1.virtualDev = &#8220;lsilogic&#8221;<br />
scsi0:1.fileName = &#8220;/MyRawDisk4Partition3.vmdk&#8221;</p></blockquote>
<p><strong>WARNING: </strong>This above example is assuming you already have a scsi device setup as your primary disk so that SCSI is already enabled for your VM. If you do not, there are a few other options that you need to add and this will get messy. If this is your case&#8230; you should first go into your Fusion settings interface and add a virtual SCSI device just so SCSI is enabled.  You cannot use IDE for raw devices imho.</p>
<p>Now save and close this file&#8230; startup your VMWare, and launch this VM!  It will (of course) ask you for your administrator credentials to access a raw device, and then it will start.  Hopefully, with your new drive in there.  You should be able to fdisk it and see the drive&#8217;s raw partitions, in my case&#8230;</p>
<blockquote><p># fdisk /dev/sdb</p>
<p>Command (m for help): p</p>
<p>Disk /dev/sdb: 40.0 GB, 40020664320 bytes<br />
255 heads, 63 sectors/track, 4865 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes<br />
Disk identifier: 0&#215;000e91cb</p>
<p>Device Boot      Start         End      Blocks   Id  System<br />
/dev/sdb1   *           1          25      200781   2d  Unknown<br />
/dev/sdb2              26         269     1959930   2d  Unknown<br />
/dev/sdb3             270        4865    36917370   83  Linux</p></blockquote>
<p>The reason you don&#8217;t see sdb1 and sdb2&#8217;s actual partition types above, is VMWare abstracts them and does this to recommend that you don&#8217;t access them.  Access to them is not restricted though, you can still mount sdb1 and sdb2 if you wish.</p>
<p><strong>NOTE:</strong> Because of how this process works, you will need to run through this whole procedure for every raw disk/partition you want to use.</p>
<p><strong>NOTE2: <span style="font-weight: normal;">This example will work also for passing through NTFS partitions into a Windows VM.  Thought I&#8217;d mention it to not leave you Windows-junkies out!  :)</span></strong></p>
<p>That concludes my tutorial!  If you ran into any problems or questions, leave a comment!</p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewfarley.com/mac/raw-disks-from-vmware-fusion/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>RPM Repository Online</title>
		<link>http://andrewfarley.com/sysadmin/rpm-repository-online</link>
		<comments>http://andrewfarley.com/sysadmin/rpm-repository-online#comments</comments>
		<pubDate>Fri, 25 Dec 2009 11:42:06 +0000</pubDate>
		<dc:creator>Andrew Farley</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Zabbix]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[repo]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://andrewfarley.com/?p=158</guid>
		<description><![CDATA[I tend to build RPMs, packages and/or spec files for recent versions of various linux packages for my preferred operating systems (CentOS, Ubuntu, Gentoo, and OS-X).  The first package inside is Zabbix 1.8 packaged for CentOS 5, but the RPMs should work on any RHEL-compatible linux.
My repository can be found at http://repo.andrewfarley.com
Or add my [...]]]></description>
			<content:encoded><![CDATA[<p>I tend to build RPMs, packages and/or spec files for recent versions of various linux packages for my preferred operating systems (CentOS, Ubuntu, Gentoo, and OS-X).  The first package inside is <a title="Zabbix - Open Source Monitoring System" href="http://zabbix.com" target="_blank">Zabbix 1.8</a> packaged for CentOS 5, but the RPMs should work on any RHEL-compatible linux.</p>
<p>My repository can be found at <a title="Andrew Farley's RPM Repository" href="http://repo.andrewfarley.com"  target="_blank">http://repo.andrewfarley.com</a></p>
<p>Or add my source to your RHEL-compatible Linux with the following command in your terminal&#8230;</p>
<pre><script type="syntaxhighlighter" class="brush: bash"><![CDATA[sudo echo '[andrewfarley]
name=Andrew Farley RPM Repository
baseurl=http://repo.andrewfarley.com/centos/$releasever/$basearch/
enabled=1
gpgcheck=0' > /etc/yum.repos.d/andrewfarley.com.repo</script></pre>
<p>And then you can install zabbix agent, zabbix server, zabbix get, or zabbix proxy with&#8230;</p>
<blockquote><p>sudo yum install zabbix-agent<br />
sudo yum install zabbix-server<br />
sudo yum install zabbix-get<br />
sudo yum install zabbix-proxy
</p></blockquote>
<p>If it fails to install, you might need to clean the metadata with the following command and try again&#8230;</p>
<blockquote><p>sudo yum clean metadata</p></blockquote>
<p><strong>Warning: </strong> I of course take no responsibility for the integrity of the packages.  I&#8217;m simply providing them for myself and anyone else who needs similar packages as myself, where possible I also provide full spec/make/build files so you can go build the packages yourself if you don&#8217;t trust me.</p>
<p>On a final note&#8230; I will be adding packages on a as-needed basis, but I plan to keep packages relatively up-to-date.  So when a new version of something comes out, expect to see the newest version in here pretty quickly.</p>
<p>Merry Christmas, and Enjoy!</p>
<p> &nbsp; Article links:</p>
<ol>
<li><a href="http://repo.andrewfarley.com/centos/specs/zabbix.spec">Zabbix 1.8.1 RPM Spec File</a></li>
<li><a href="http://repo.andrewfarley.com/centos/5/">CentOS/RHEL RPMs</a></li>
<li><a href="http://www.zabbix.com/forum/showpost.php?p=54836&#038;postcount=7">PHP >= 5.2 requirements for zabbix-web</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://andrewfarley.com/sysadmin/rpm-repository-online/feed</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Zabbix 1.8 API &#8211; PHP Class v1.0</title>
		<link>http://andrewfarley.com/php/zabbix-1-8-api-php-class-v1-0</link>
		<comments>http://andrewfarley.com/php/zabbix-1-8-api-php-class-v1-0#comments</comments>
		<pubDate>Wed, 23 Dec 2009 17:54:57 +0000</pubDate>
		<dc:creator>Andrew Farley</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Zabbix]]></category>

		<guid isPermaLink="false">http://andrewfarley.com/?p=133</guid>
		<description><![CDATA[Recently Zabbix, a server monitoring utility released version 1.8 with a brand spanking new API!  This means that finally, the world can begin to write software the digests the Zabbix API to pull data into various other portals, services, and platforms.  My first foray into embedding Zabbix into various other portals required me to first start with a simple class to access Zabbix.  And... ::drum roll please:: here it is!  This is a fully open-sourced project of mine.  [...]]]></description>
			<content:encoded><![CDATA[<p>Recently <a href="http://zabbix.com">Zabbix</a>, a server monitoring utility released <a href="http://www.zabbix.com/rn1.8.php">Zabbix 1.8</a>.  One of the newest (and coolest) features is an <a href="http://www.zabbix.com/documentation/1.8/api">API, with documentation</a>!  This means that finally, the world can begin to write software the digests the Zabbix API to pull data into various other portals, services, and platforms.</p>
<p>My first foray into this arena led me to making a class to make it easy for myself (and anyone else) to have a simple way to access Zabbix from PHP.  First before you use the code you need to make a Zabbix user and group with the proper privileges.  From my example below, I used the user apiuser, and password ap1.  I recommend making it a LOT more secure.</p>
<p>So here is an example of what your user and his privileges should look like&#8230;<br />
<a href="http://andrewfarley.com/php/zabbix-1-8-api-php-class-v1-0/attachment/zabbix-api-user-2" rel="attachment wp-att-141"><img src="http://andrewfarley.com/wp-content/uploads/2009/12/zabbix-api-user1.gif" alt="Zabbix API - User Creation" title="Zabbix API - User Creation" width="667" height="45" class="aligncenter size-full wp-image-141" /></a><br />
And here is what your group should look like when you&#8217;re done&#8230;<br />
<a href="http://andrewfarley.com/php/zabbix-1-8-api-php-class-v1-0/attachment/zabbix-api-group" rel="attachment wp-att-137"><img src="http://andrewfarley.com/wp-content/uploads/2009/12/zabbix-api-group.gif" alt="Zabbix API Group Creation" title="Zabbix API - Group Creation" width="624" height="45" class="aligncenter size-full wp-image-137" /></a></p>
<p>And finally, here&#8217;s an example of how to use the API&#8230; and as you&#8217;ll see in the example below, the hostname of my zabbix server is &#8220;genbook&#8221;, one of my private development environments.  Scroll to the bottom to get the download link for the API and example code.</p>
<pre><script type="syntaxhighlighter" class="brush: php"><![CDATA[
require_once("ZabbixAPI.class.php");

// This enables debugging, this is rather verbose but can help debug problems
//ZabbixAPI::debugEnabled(TRUE);

// This logs into Zabbix, and returns false if it fails
ZabbixAPI::login('http://genbook/zabbix/','apiuser','ap1')
    or die('Unable to login: '.print_r(ZabbixAPI::getLastError(),true));

// This gets the version of the zabbix server
$version = ZabbixAPI::fetch_string('apiinfo','version')
    or die('Unable to get Zabbix Version: '.print_r(ZabbixAPI::getLastError(),true));
echo "Server running Zabbix API Version: $version\n";

// Fetch the user ids on the server, fetch_column ensures we just get the first item
// if you want to understand why I do this, put fetch_array instead and see!
$users = ZabbixAPI::fetch_column('user','get')
    or die('Unable to get user ids: '.print_r(ZabbixAPI::getLastError(),true));
echo "User IDs found: ".implode($users,',')."\n";

// Fetch hosts, but with extend option to get more data, and limit records returned
$five_hosts = ZabbixAPI::fetch_array('host','get',array('extendoutput'=>1, 'limit'=>5)) 
    or die('Unable to get hosts: '.print_r(ZabbixAPI::getLastError(),true));
echo "Retrieved maximum of five hosts: ".print_r($five_hosts, true)."\n";

// Do a simple update of userid = 1, set refresh = 1000
// NOTE: If this fails, it's because your API user is not a super-admin
ZabbixAPI::query('user','update',array('userid'=>1, 'refresh'=>1000)) 
    or die('Unable to update: '.print_r(ZabbixAPI::getLastError(),true));
echo "Updated userid 1 with refresh value of 1000!\n";
</script></pre>
<p>Grab my Zabbix API Class (v1.0), and example code here: <a href="http://andrewfarley.com/wp-content/uploads/2009/12/zabbix_php_api_v1_0.zip" alt="Zabbix PHP API Class">zabbix_php_api_v1_0.zip</a></p>
<p>Your feedback, input, and patches are welcome.  For now please use my comment form below to submit feedback.  I will setup another method to contact me regarding suggesting improvements in the future.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewfarley.com/php/zabbix-1-8-api-php-class-v1-0/feed</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
	</channel>
</rss>

