<?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>MuckNet</title>
	<atom:link href="http://www.muck.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.muck.net</link>
	<description>Sysadmin, Production Datacenter, Food :)</description>
	<lastBuildDate>Mon, 05 Oct 2009 03:03:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Configure Daylight savings time (and NTP) on Cisco Routers</title>
		<link>http://www.muck.net/?p=37</link>
		<comments>http://www.muck.net/?p=37#comments</comments>
		<pubDate>Sat, 03 Oct 2009 19:57:32 +0000</pubDate>
		<dc:creator>Doug Peterson</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.muck.net/?p=37</guid>
		<description><![CDATA[Starting in 2007, daylight time begins in the United States on the second Sunday in March and ends on the first Sunday in November. On the second Sunday in March, clocks are set ahead one hour at 2:00 a.m. local standard time, which becomes 3:00 a.m. local daylight time. On the first Sunday in November, [...]]]></description>
			<content:encoded><![CDATA[<p>Starting in 2007, daylight time begins in the United States on the second Sunday in March and ends on the first Sunday in November. On the second Sunday in March, clocks are set ahead one hour at 2:00 a.m. local standard time, which becomes 3:00 a.m. local daylight time. On the first Sunday in November, clocks are set back one hour at 2:00 a.m. local daylight time, which becomes 1:00 a.m. local standard time. These dates were established by Congress in the <a href="http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=109_cong_public_laws&amp;docid=f:publ058.109" target="blank">Energy Policy Act of 2005, Pub. L. no. 109-58, 119 Stat 594 (2005)</a>.</p>
<p>Some older cisco IOS routers don&#8217;t have the new time zone information. Below is an example of my time related configuration, including NTP and logging options. Configure this and you will no longer be lost when looking at logs! <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>My timezone is obviously Pacific, but you can insert your own. CDT, EDT, CST, EST, etc <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>service timestamps debug datetime localtime<br />
service timestamps log datetime localtime<br />
clock timezone PST -8<br />
clock summer-time PDT recurring 2 Sun Mar 2:00 2 Sun Nov 2:00<br />
ntp logging<br />
ntp update-calendar<br />
ntp server 4.us.pool.ntp.org<br />
ntp server 2.us.pool.ntp.org<br />
ntp server 1.us.pool.ntp.org<br />
ntp server 3.us.pool.ntp.org<br />
ntp server 0.us.pool.ntp.org</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muck.net/?feed=rss2&amp;p=37</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitor number of postfix mails sent using Zabbix.</title>
		<link>http://www.muck.net/?p=32</link>
		<comments>http://www.muck.net/?p=32#comments</comments>
		<pubDate>Thu, 20 Mar 2008 19:07:58 +0000</pubDate>
		<dc:creator>Doug Peterson</dc:creator>
				<category><![CDATA[Zabbix]]></category>
		<category><![CDATA[cacti]]></category>
		<category><![CDATA[log files]]></category>
		<category><![CDATA[maillog]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[sendmail]]></category>

		<guid isPermaLink="false">http://www.muck.net/?p=32</guid>
		<description><![CDATA[The title of this post is about zabbix, because thats my NMS of choice, but this method would apply to just about any  monitoring application out there. Cacti, Nagios, big brother, opennms, etc. It also is not limited to postfix. Sendmail would work with a minor modification (look for stat=Sent, instead of status=sent).
OK, so [...]]]></description>
			<content:encoded><![CDATA[<p>The title of this post is about zabbix, because thats my NMS of choice, but this method would apply to just about any  monitoring application out there. Cacti, Nagios, big brother, opennms, etc. It also is not limited to postfix. Sendmail would work with a minor modification (look for stat=Sent, instead of status=sent).</p>
<p>OK, so what is the problem? Sendmail is archaic. Postfix tries to be backwards compatible with archaic. Neither of them keep a running counter of total messages sent. So in order to keep an eye on how many mail messages are coming out of your system (or not coming out of your system as the case may unfortunately be), you have to come up with some hokey way of grabbing those stats from the log file. I spent an hour or so searching for someones already written script, thinking SOMEONE has to have done this. And while I found a lot of people asking the question, I didn&#8217;t find any tidy, wrapped up answers.</p>
<p>There are lots of solutions to comb your logs nightly and produce a graph or report, but I wanted real time data, and I wanted the data in my NMS, so I could do my own graphing and alerting. One thing I absolutely hate is having 18 applications capable of alerting me of various things. So I cobbled together this perl script, which will check the last X minutes of a logfile for a string, and return it to you. You can then pipe it through a &#8216;wc -l&#8217; to count how many times it occured. You can put it in cron, and pipe it through mail, to send you a copy, whatever you want.</p>
<p>Requirements:</p>
<p><strong><a href="http://search.cpan.org/perldoc?File::ReadBackwards" target="_blank">ReadBackwards Perl Module </a> </strong>- You can install from source if your servers don&#8217;t have internet access (IMHO &#8211; production servers should never have outbound internet access, inbound only &#8212; I&#8217;ll save that lecture for another blog post. Maybe.).  If you have internet access just run:</p>
<blockquote><p> perl -MCPAN -e &#8216;install File::ReadBackwards&#8217;</p></blockquote>
<p><strong>/var/log/maillog permissions</strong> &#8211; (or whatever log file you&#8217;re looking at). Make sure the user you&#8217;re reading the log files with can read that log file <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  by default your unprivileged zabbix user cannot read /var/log/maillog. You can fix this any number of ways. chmod. sudo. changing file ownership. I chose to change file ownership. this seems the cleanest, and I don&#8217;t view it as a security risk for my maillog to be readable by all users on the system. Before you ask &#8211; Yes, your logrotate process will continue to propogate those new permissions, because it gets its cue&#8217;s, from the file it is rotating</p>
<blockquote><p>chmod a+r /var/log/maillog</p></blockquote>
<p>The script itself is below, but I will also attach it to this post, because wordpress will surely screw the formatting or characters up.. so please download the attached perl script here, before complaining it won&#8217;t compile: <a href="http://www.muck.net/wp-content/uploads/2008/03/count_pf_mailpl.txt" title="count_pf_mail.pl.txt">count_pf_mail.pl.txt</a></p>
<pre>#!/usr/bin/perl
use File::ReadBackwards;
use POSIX "strftime";

my $items;
my $time = $ARGV[0];
my $logfile = "/var/log/maillog";
my $search_string = "status=sent";
my $goback = POSIX::strftime( "%b %d %H:%M:%S", localtime( time() - $time * 60 ) );

$readback = File::ReadBackwards-&gt;new( $logfile ) or
                        die "unable to open '$logfile' $!" ;

while ( defined( my $line = $readback-&gt;readline() ) ) {

    last if $line lt $goback;

    if ($line =~ /$search_string/) {
        print $line;
    }

}</pre>
<p>The only argument the script takes is number of minutes to go back in the log file.</p>
<blockquote><p>[doug@app5 ~]# /usr/local/bin/count_pf_mail.pl 5</p>
<p>Mar 20 11:12:01 app5 postfix/smtp[31232]: D864A77EBA: to=<dpeterson@gmail.com>, relay=gmail-smtp-in.l.google.com[72.14.253.27]:25, delay=0.27, delays=0.04/0/0.08/0.14, dsn=2.0.0, status=sent (250 2.0.0 OK 1206036799 n20si3574089pof.6)<br />
Mar 20 11:12:02 app5 postfix/smtp[31223]: DAD4B77EB3: to=<dpeterson@gmail.com>, relay=gmail-smtp-in.l.google.com[72.14.253.27]:25, delay=0.22, delays=0.02/0.01/0.08/0.11, dsn=2.0.0, status=sent (250 2.0.0 OK 1206036799 q18si3562811pog.12)</dpeterson@gmail.com></dpeterson@gmail.com></p>
<p>&#8230;</p></blockquote>
<h4>Is this totally accurate?</h4>
<p>Absolutely not. Its close, but its not perfect. It assumes that your monitoring time period will be at EXACTLY the right interval. That won&#8217;t ever happen, so its possible that some mail will be counted twice, and some will not be counted at all. However, its good enough for comparison purposes, and its better than nothing <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  In my ideal world, this script would feed into a database/file of already counted message ID&#8217;s, to make sure that the same message ID isn&#8217;t counted twice. But This works good enough for me <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h4> OK, so how do I  make this work with zabbix?</h4>
<p><strong>zabbix_agentd.conf:</strong></p>
<p>The only UserParameter you&#8217;re really worried about for this particular usage is the last one, but if you download my zabbix template below, you&#8217;ll want the other 2 also <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre>UserParameter=mailq,/usr/bin/mailq | grep Request | awk '{print $5}'
UserParameter=established_conns[*], netstat -an | grep :$1 | grep ESTABLISHED |wc -l
UserParameter=count_pf_mail[*], /usr/local/bin/count_pf_mail.pl $1 |wc -l</pre>
<p>Creating a zabbix item:</p>
<p>Choosing a longer polling period will make the results more accurate over time. I&#8217;ve been experimenting with 3 minutes, 5 minutes, etc.  I wouldn&#8217;t suggest anything less than 3 minutes. <strong>The following example uses a 3 minute polling interval, and displays it as a &#8220;per minute&#8221; statistic</strong>. You could modify to be per second, per hour, per 5 minutes if you want. Its all just math. I&#8217;ve highlighted the parameters that need to be changed if you want to change the polling period.</p>
<p>Key: count_pf_mail[<strong>3</strong>]</p>
<p>Type of Information: Float</p>
<p>Multiplier (Use Custom): <strong>.333</strong></p>
<p>Update Interval: <strong>180</strong></p>
<p>If you wanted to do <strong>5 minute</strong> polling intervals, and still display it as a per minute statistic:</p>
<p>Key: count_pf_mail[<strong>5</strong>]</p>
<p>Type of Information: Float</p>
<p>Multiplier (Use Custom): <strong>.2</strong></p>
<p>Update Interval: <strong>300</strong></p>
<p><a href="http://www.muck.net/wp-content/uploads/2008/03/sentoutboundmail.jpg" title="Zabbix Item configuartion"><img src="http://www.muck.net/wp-content/uploads/2008/03/sentoutboundmail.jpg" alt="Zabbix Item configuartion" /></a></p>
<p>Zabbix Graph showing the data from my (not yet active) postfix cluster:</p>
<p><a href="http://www.muck.net/wp-content/uploads/2008/03/postfix-mail-sent.png" title="Postfix Mail Sent Graph"><img src="http://www.muck.net/wp-content/uploads/2008/03/postfix-mail-sent.png" alt="Postfix Mail Sent Graph" /></a></p>
<p>You can also download my postfix template here: <a href="http://www.muck.net/wp-content/uploads/2008/03/template_app_postfix_zabbix_exportxml.txt" title="template_app_postfix.xml.txt">template_app_postfix.xml.txt </a></p>
<p>It will work with the mailq and established_conns Userparameter above. It is by no means completed or final, but hopefully you&#8217;ll find it useful anyway. Everything here could be modified pretty easily to work with sendmail also.</p>
<p>As always if you find this post helpful, let me know! Comments, suggestions, and corrections are always welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muck.net/?feed=rss2&amp;p=32</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Howto: Reset a foundry ServerIron XL to factory defaults</title>
		<link>http://www.muck.net/?p=31</link>
		<comments>http://www.muck.net/?p=31#comments</comments>
		<pubDate>Wed, 05 Dec 2007 05:29:49 +0000</pubDate>
		<dc:creator>Doug Peterson</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[default]]></category>
		<category><![CDATA[defaults]]></category>
		<category><![CDATA[factory]]></category>
		<category><![CDATA[foundry]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[reset]]></category>
		<category><![CDATA[serveriron]]></category>

		<guid isPermaLink="false">http://www.muck.net/?p=31</guid>
		<description><![CDATA[I needed to reset a Foundry Server Iron XL back to factory defaults, and surprisingly couldn&#8217;t find the instructions via my buddy google. Foundry is really stingy with with support documents, and knowledge portal acccess, and unless you have a valid support contract, you can&#8217;t find ANYTHING. Luckily I do, so I figured I&#8217;d share [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to reset a Foundry Server Iron XL back to factory defaults, and surprisingly couldn&#8217;t find the instructions via my buddy google. Foundry is really stingy with with support documents, and knowledge portal acccess, and unless you have a valid support contract, you can&#8217;t find ANYTHING. Luckily I do, so I figured I&#8217;d share this knowledge for the sake of future googlers.</p>
<p>First, remove the password:</p>
<p>1) Unplug the Switch</p>
<p>2) Plug the switch back in, and be immediately ready to:</p>
<p>3) Hit b, to enter into the boot monitor</p>
<p>4) Type:</p>
<blockquote><p><code>no password</code></p>
<p>boot system flash primary</p></blockquote>
<p>5) Foundry will boot up, and you can &#8216;enable&#8217; without being prompted for a password</p>
<p>To reset your ServerIronXL to factory defaults:</p>
<p>6) After enabling, type:</p>
<blockquote>
<pre>erase start</pre>
</blockquote>
<p>NOTE: This is permanent! There is no going back! Make sure this is what you want to do! You are resetting to factory defaults (nothing!)</p>
<p>7) Reboot, and enjoy your clean slate</p>
<p>As always, if you find this helpful, please let me know!<code></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.muck.net/?feed=rss2&amp;p=31</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Zabbix: SSL Web Scenarios patch</title>
		<link>http://www.muck.net/?p=29</link>
		<comments>http://www.muck.net/?p=29#comments</comments>
		<pubDate>Wed, 14 Nov 2007 03:00:21 +0000</pubDate>
		<dc:creator>Doug Peterson</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Zabbix]]></category>
		<category><![CDATA[CN]]></category>
		<category><![CDATA[libcurl]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[web scenario]]></category>

		<guid isPermaLink="false">http://www.muck.net/?p=29</guid>
		<description><![CDATA[Zabbix uses libcurl (libraries, not binaries) to do its Web Scenarios. Web scenarios are very powerful, and allow you to emulate a user experience. Using a Zabbix web scenario, you can emulate logging into your site, accepting the cookie, clicking on something unique (Report showing 10 Last purchases for example), then verify that you get [...]]]></description>
			<content:encoded><![CDATA[<p>Zabbix uses libcurl (libraries, not binaries) to do its Web Scenarios. Web scenarios are very powerful, and allow you to emulate a user experience. Using a Zabbix web scenario, you can emulate logging into your site, accepting the cookie, clicking on something unique (Report showing 10 Last purchases for example), then verify that you get either a particular HTTP code, or that certain text shows up in the response. Way cool stuff. Its got a few kinks to be worked out, however. One very frustrating one is that these web scenarios are not template aware yet&#8230; But the zabbix team is working on it, and its going to be a part of a future release. One minor, but significant thing for several of my environments is that the web scenario will error out if the SSL certificate CN (www.yoursite.com) does not match the URL you accessed the web server with.</p>
<p>But Doug, thats bad practice for the CN to not match the url!</p>
<p>I know! However, in most environments its not uncommon for the internal DNS name to NOT match the external DNS name. For example, the CN name for your SSL cert will be www.yoursite.com, but internally you have 10 app servers responding as www. You refer to them as app1.sjc.yoursite.com, app2.phx.yoursite.com.</p>
<p>By default curl (and therefore zabbix) will error out. With the following:</p>
<blockquote><p><span class="disabled">Failed on &#8220;HTTPS TEST app1.sjc.yoursite.com&#8221; [1 of 1]  Error: SSL peer certificate was not ok</span></p></blockquote>
<p>I&#8217;ve written a patch for the zabbix_server binary, which will instruct libcurl to not error out, and life is peachy! You need to unpack the zabbix source, apply the patch, recompile, and install the new binary. The patch, and steps are below:</p>
<p>I&#8217;ve attached the patch to this post, I&#8217;d suggest <a href="http://www.muck.net/wp-content/uploads/2007/11/libcurl_disable_ssl_verifyhost.patch" title="libcurl disable ssl verifyhost">downloading it</a>, instead of copying and pasting, but if you&#8217;d like to here it is:</p>
<blockquote>
<pre>--- src/zabbix_server/httppoller/httptest.c     2007-08-20 12:22:22.000000000 -0700
 +++ src/zabbix_server/httppoller/httptest.c.dp  2007-11-13 17:53:54.000000000 -0800
 @@ -318,6 +318,15 @@ static void        process_httptest(DB_HTTPTEST
 return;
 }</pre>
<pre>+       /* Process certs whose hostnames do not match the queried hostname. */
 +       if(CURLE_OK != (err = curl_easy_setopt(easyhandle,CURLOPT_SSL_VERIFYHOST , 0)))
 +       {
 +               zabbix_log(LOG_LEVEL_ERR, "Cannot set CURLOPT_SSL_VERIFYHOST [%s]",
 +                       curl_easy_strerror(err));
 +               (void)curl_easy_cleanup(easyhandle);
 +               return;
 +       }
 +
 lastfailedstep=0;
 httptest-&gt;time = 0;
 result = DBselect("select httpstepid,httptestid,no,name,url,timeout,posts,required,status_codes from httpstep where httptest
 id=" ZBX_FS_UI64 " order by no",</pre>
</blockquote>
<p>Link to Patch: <a href="http://www.muck.net/wp-content/uploads/2007/11/libcurl_disable_ssl_verifyhost.patch" title="libcurl disable ssl verifyhost">libcurl disable ssl verifyhost</a></p>
<h4>Instructions for installing patch:</h4>
<p>Shut down zabbix_server process</p>
<blockquote><p>/etc/init.d/zabbix_server stop</p></blockquote>
<p>If you already have your zabbix source unpacked, you can skip the first tar step <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I&#8217;ve checked the patch with Zabbix 1.4.1 and 1.4.2</p>
<blockquote><p>tar -zxvf zabbix-1.4.2.tar.gz</p>
<p>cd zabbix-1.4.2</p>
<p>wget http://www.muck.net/wp-content/uploads/2007/11/libcurl_disable_ssl_verifyhost.patch</p>
<p>patch src/zabbix_server/httppoller/httptest.c libcurl_ssl_verifyhost.patch</p></blockquote>
<p>Then build zabbix_server as normal, for example:</p>
<blockquote><p> ./configure &#8211;enable-server &#8211;prefix=/usr/local/zabbix &#8211;with-mysql &#8211;with-net-snmp &#8211;with-libcurl</p>
<p>make install</p></blockquote>
<p>Restart zabbix_server</p>
<blockquote><p>/etc/init.d/zabbix_server start</p></blockquote>
<p>Your Internal SSL Web Scenarios should now work!  That was easy wasn&#8217;t it?</p>
<p>As always, I appreciate any feedback, and would love to hear if this helped you, or if you have any questions! <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.muck.net/?feed=rss2&amp;p=29</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>New Zabbix 1.4.2 demo online!</title>
		<link>http://www.muck.net/?p=28</link>
		<comments>http://www.muck.net/?p=28#comments</comments>
		<pubDate>Wed, 07 Nov 2007 06:11:07 +0000</pubDate>
		<dc:creator>Doug Peterson</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Zabbix]]></category>
		<category><![CDATA[datacenter]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[monitoring]]></category>

		<guid isPermaLink="false">http://www.muck.net/?p=28</guid>
		<description><![CDATA[I&#8217;ve been saying I was going to do it for the last 6 months. I finally did it this weekend. I built a demo version of zabbix that I can give full admin rights to. If you&#8217;re not familiar with zabbix you can visit my zabbix page , or the zabbix website .
The problem with [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been saying I was going to do it for the last 6 months. I finally did it this weekend. I built a demo version of zabbix that I can give full admin rights to. If you&#8217;re not familiar with zabbix you can visit <a href="http://www.muck.net/?page_id=3">my zabbix page</a> , or the<a href="http://www.muck.net/wp-admin/www.zabbix.com" target="_blank"> zabbix website</a> .</p>
<p>The problem with the old zabbix demo was that it was the only copy. If someone messed it up, I had to manually go in and restore the DB. It didn&#8217;t have a self recovery method. In the end, it meant that I was limited to handing out read only access in most cases. That in turn meant it wasn&#8217;t used very often by folks, and because it wasn&#8217;t used very often, I neglected it.</p>
<p>However! I have now put zabbix into its own VM universe. I took a snapshot of a &#8220;clean&#8221; zabbix installation, which is known to be good. Every 24 hours, I wipe out the VM instance, put a new one in place, restore the Zabbix DB, and timeshift all the data so it looks like the data is contiguous, even though in all likelyhood its several weeks old.  The process results in about 10 minutes of downtime, and another 20 minutes of data processing in the background. Any data displayed from Midnight PST through Midnight PST the following night, is live, accurate, real data, not timeshifted data.</p>
<p>I&#8217;m pretty happy with it so far. I still want to add a lot more items and hosts to the demo, but I think its a great start. As far as I know this is the only Zabbix Demo, so I&#8217;d love to hear from you what you&#8217;d like to see in the demo. More graphs? Screens? Web Monitoring? oracle monitoring? mysql monitoring? Zabbix Tutorials? Walkthroughs? Clever uses for the Demo? Any and all comments appreciated.</p>
<p>Feel free to add new hosts, or even install a zabbix agent on your side and monitor your own server (until midnight that is, when the DB will be reset). I get a lot of hits on my site every day from people searching google for zabbix demo&#8217;s. Hopefully this will raise awareness of zabbix and get more people using this excellent tool.</p>
<p>Of course, I can also help you with your zabbix deployment. I can do a custom install for your environment, or I can ship you a pre configured zabbix box that you just plug in and go. If you&#8217;d like talk about my zabbix services, please indicate so on the Zabbix Demo form below. Hopefully the form you have to fill out to get access to the zabbix demo isn&#8217;t too painful. If you really dislike me for making you fill out a form to get the login credentials, feel free to call me names in every field except the email field. That one happens to be accurate in order to get the login credentials! <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Stay tuned over the next several weeks for updates and new features.</p>

		<p id="usermessage2a" class="info success" ></p>
		<form enctype="multipart/form-data" action="/?feed=rss2#usermessage2a" method="post" class="cform" id="cforms2form">
		<fieldset class="cf-fs1">
		<legend>Zabbix Demo</legend>
		<ol class="cf-ol">
			<li><label  for="cf2_field_2"><span>Your Name</span></label><input  type="text" name="cf2_field_2" id="cf2_field_2" class="default fldrequired" value="Your Name" onfocus="clearField(this)" onblur="setField(this)"/><span class="reqtxt">&nbsp;(required)</span></li>
			<li><label  for="cf2_field_3"><span>Email</span></label><input  type="text" name="cf2_field_3" id="cf2_field_3" class="default fldemail" value=""/><span class="emailreqtxt">&nbsp;(valid email required)</span></li>
			<li><label  for="cf2_field_4"><span>Website</span></label><input  type="text" name="cf2_field_4" id="cf2_field_4" class="default fldrequired" value="http://"/><span class="reqtxt">&nbsp;(required)</span></li>
			<li><label  for="cf2_field_5"><span>Location (City,State,Country)</span></label><input  type="text" name="cf2_field_5" id="cf2_field_5" class="default fldrequired" value=""/><span class="reqtxt">&nbsp;(required)</span></li>
			<li><label  for="cf2_field_6"><span>Phone Number</span></label><input  type="text" name="cf2_field_6" id="cf2_field_6" class="default fldrequired" value=""/><span class="reqtxt">&nbsp;(required)</span></li>
			<li><label  for="cf2_field_7"><span>Zabbix Demo usage </span></label><select  name="cf2_field_7" id="cf2_field_7" class="cformselect default fldrequired"><option value="Please select one..." selected="selected">Please select one...</option><option value="Comparing to other products " >Comparing to other products </option><option value="Evaluating zabbix upgrade " >Evaluating zabbix upgrade </option><option value="Looking for ideas " >Looking for ideas </option><option value="Looking to replace current monitoring system " >Looking to replace current monitoring system </option><option value="Looking for first monitoring system " >Looking for first monitoring system </option><option value="Other " >Other </option><option value="Leave me alone and just let me get to the demo!" >Leave me alone and just let me get to the demo!</option></select><span class="reqtxt">&nbsp;(required)</span></li>
			<li class="cf-box-title">Please select any software packages you're currently using </li>
			<li class="cf-box-group">
				<input  type="checkbox" id="cf2_field_81" name="cf2_field_8[]" value="zabbix "  class="cf-box-b"/><label  for="cf2_field_81" class="cf-group-after"><span>zabbix </span></label><input  type="checkbox" id="cf2_field_82" name="cf2_field_8[]" value="mrtg "  class="cf-box-b"/><label  for="cf2_field_82" class="cf-group-after"><span>mrtg </span></label><input  type="checkbox" id="cf2_field_83" name="cf2_field_8[]" value="OpenNMS "  class="cf-box-b"/><label  for="cf2_field_83" class="cf-group-after"><span>OpenNMS </span></label><input  type="checkbox" id="cf2_field_84" name="cf2_field_8[]" value="Cacti "  class="cf-box-b"/><label  for="cf2_field_84" class="cf-group-after"><span>Cacti </span></label><input  type="checkbox" id="cf2_field_85" name="cf2_field_8[]" value="Nagios "  class="cf-box-b"/><label  for="cf2_field_85" class="cf-group-after"><span>Nagios </span></label><input  type="checkbox" id="cf2_field_86" name="cf2_field_8[]" value="BigBrother "  class="cf-box-b"/><label  for="cf2_field_86" class="cf-group-after"><span>BigBrother </span></label><input  type="checkbox" id="cf2_field_87" name="cf2_field_8[]" value="BigSister "  class="cf-box-b"/><label  for="cf2_field_87" class="cf-group-after"><span>BigSister </span></label><input  type="checkbox" id="cf2_field_88" name="cf2_field_8[]" value="Syslog-ng "  class="cf-box-b"/><label  for="cf2_field_88" class="cf-group-after"><span>Syslog-ng </span></label><input  type="checkbox" id="cf2_field_89" name="cf2_field_8[]" value="Other "  class="cf-box-b"/><label  for="cf2_field_89" class="cf-group-after"><span>Other </span></label><input  type="checkbox" id="cf2_field_810" name="cf2_field_8[]" value="Custom "  class="cf-box-b"/><label  for="cf2_field_810" class="cf-group-after"><span>Custom </span></label>
			</li>
			<li><label  for="cf2_field_9"><span>Would you like to be contacted by MuckNet?</span></label><select  name="cf2_field_9" id="cf2_field_9" class="cformselect default fldrequired"><option value="Please select one..." selected="selected">Please select one...</option><option value="Yes " >Yes </option><option value="No " >No </option><option value="Leave me alone, and let me get to the demo!" >Leave me alone, and let me get to the demo!</option></select><span class="reqtxt">&nbsp;(required)</span></li>
			<li><label  for="cf2_field_10"><span>Comments or questions?</span></label><textarea  cols="30" rows="8" name="cf2_field_10" id="cf2_field_10" class="default"></textarea></li>
		</ol>

		</fieldset>
		<fieldset class="cf_hidden">
			<input type="hidden" name="cf_working2" id="cf_working2" value="One%20moment%20please..."/>
			<input type="hidden" name="cf_failure2" id="cf_failure2" value="Please%20fill%20in%20all%20the%20required%20fields."/>
			<input type="hidden" name="cf_codeerr2" id="cf_codeerr2" value="Please%20double-check%20your%20verification%20code."/>
			<input type="hidden" name="cf_customerr2" id="cf_customerr2" value=""/>
			<input type="hidden" name="cf_popup2"   id="cf_popup2"   value="nn"/>
		</fieldset>
		<p class="cf-sb"><input type="submit" name="sendbutton2" id="sendbutton2" class="sendbutton" value="Submit"/></p>
		</form>
		<p class="linklove" id="ll2"><a href="http://www.deliciousdays.com/cforms-plugin"><em>cforms</em> contact form by delicious:days</a></p>
		<p id="usermessage2b" class="info success" ></p>

]]></content:encoded>
			<wfw:commentRss>http://www.muck.net/?feed=rss2&amp;p=28</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>The war on the different&#8230;</title>
		<link>http://www.muck.net/?p=25</link>
		<comments>http://www.muck.net/?p=25#comments</comments>
		<pubDate>Thu, 01 Nov 2007 19:14:09 +0000</pubDate>
		<dc:creator>Doug Peterson</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.muck.net/?p=25</guid>
		<description><![CDATA[Here is an excellent article from Bruce Schneier about the day to day effects of the &#8220;War on Terror&#8221;. He points out the many many ridiculous suspected acts of terrorism, and the absolutely mind numbingly stupid act of rewarding those who over react. This not only is an incredible waste of time and resources, but [...]]]></description>
			<content:encoded><![CDATA[<p>Here is an <a href="http://www.schneier.com/blog/archives/2007/11/the_war_on_the.html" target="_blank">excellent article</a> from Bruce Schneier about the day to day effects of the &#8220;War on Terror&#8221;. He points out the many many ridiculous suspected acts of terrorism, and the absolutely mind numbingly stupid act of rewarding those who over react. This not only is an incredible waste of time and resources, but it only serves to further install fear of the abnormal in the general populace. This has been one of my major frustrations for the last 3 or 4 years, and I hope that more people will see the absurdity of this kind of behavior, and chastise our public officials for acting like paranoid delusionals with a CYA mentality.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muck.net/?feed=rss2&amp;p=25</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fuse and encFS from source on CENTOS 5 or RHEL 5</title>
		<link>http://www.muck.net/?p=24</link>
		<comments>http://www.muck.net/?p=24#comments</comments>
		<pubDate>Tue, 23 Oct 2007 01:41:47 +0000</pubDate>
		<dc:creator>Doug Peterson</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[encfs]]></category>
		<category><![CDATA[fuse]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[source]]></category>

		<guid isPermaLink="false">http://www.muck.net/?p=24</guid>
		<description><![CDATA[Installing from source on RHEL5 and CENTOS5 is quite painless. Fuse needs to compile a kernel module for your kernel.  I started from a minimal install, and did the following:
Update 12/6/2007:  There is a bug with more recent updates of RHEL5 (Similar or the same as this bug: https://bugzilla.redhat.com/show_bug.cgi?id=228430). The bug will cause [...]]]></description>
			<content:encoded><![CDATA[<p>Installing from source on RHEL5 and CENTOS5 is quite painless. Fuse needs to compile a kernel module for your kernel.  I started from a minimal install, and did the following:</p>
<p>Update 12/6/2007:  There is a bug with more recent updates of RHEL5 (Similar or the same as this bug: <a href="https://bugzilla.redhat.com/show_bug.cgi?id=228430" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=228430</a>). The bug will cause the original &#8220;yum install&#8221; command to fail with the following:</p>
<blockquote><p>Error: No Package Matching glibc.i686</p></blockquote>
<p>To prevent that, install glibc first, then install the rest of the stuff you want:</p>
<blockquote><p>yum install glibc</p>
<p>yum install kernel-devel gcc kernel-headers openssl  gcc-c++ openssl-devel boost-devel</p></blockquote>
<p>Update (2/5/2008): I added boost-devel to the install list, because of an error I encountered installing on CentOS 4.</p>
<blockquote><p><strong><em>checking boost/shared_ptr.hpp usability&#8230; no<br />
checking boost/shared_ptr.hpp presence&#8230; no<br />
checking for boost/shared_ptr.hpp&#8230; no<br />
configure: error:<br />
Can&#8217;t find boost/shared_.h &#8211; add the boost include dir to CPPFLAGS and<br />
rerun configure, eg:<br />
export CPPFLAGS=-I/usr/local/include  </em></strong></p></blockquote>
<p>Download latest fuse (2.7.1 at this time 10/2007)</p>
<blockquote><p>wget http://internap.dl.sourceforge.net/sourceforge/fuse/fuse-2.7.1.tar.gz</p></blockquote>
<p>Download latest rlog (1.3.7 at this time)</p>
<blockquote><p>wget http://freshmeat.net/redir/rlog/47815/url_tgz/rlog-1.3.7.tgz</p></blockquote>
<p>Download latest encFS (1.3.2-1 at this time)</p>
<blockquote><p>wget http://freshmeat.net/redir/encfs/45687/url_tgz/encfs-1.3.2-1.tgz</p></blockquote>
<p>Rlog:</p>
<blockquote><p>tar -xvzf rlog-1.3.7.tgz</p>
<p>cd rlog-1.3.7</p>
<p>./configure</p>
<p>make</p>
<p>make install</p></blockquote>
<p>Fuse:  lather, rinse</p>
<blockquote><p>tar -xvzf fuse-2.7.1.tar.gz</p>
<p>cd fuse-2.7.1</p>
<p>./configure</p>
<p>make</p>
<p>make install</p></blockquote>
<p>encF: and repeat</p>
<blockquote><p>tar -xzvf encfs-1.3.2-1.tgz</p>
<p>cd encfs-1.3.2</p>
<p>./configure</p>
<p>make</p>
<p>make install</p></blockquote>
<p>Start fuse:</p>
<blockquote><p>/etc/init.d/fuse start</p></blockquote>
<p>Fix init script for CentOS, replace the startup information at the top with:</p>
<blockquote><p><strong>### BEGIN INIT INFO<br />
# chkconfig: 2345 90 10<br />
# description:       Load the fuse module and mount the fuse control<br />
#       filesystem.<br />
### END INIT INFO</strong></p></blockquote>
<p>Run:</p>
<blockquote><p>chkconfig &#8211;add fuse</p></blockquote>
<p>Create an Encrypted Filesystem (Its not really a filesystem&#8230; but I digress)  as a test:</p>
<blockquote><p>encfs /usb/disk1/.crypt-raw /usb/disk1/crypt-mount</p></blockquote>
<p>It really is that easy. Good luck! <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.muck.net/?feed=rss2&amp;p=24</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Installing Zabbix 1.4 on CentOS 5</title>
		<link>http://www.muck.net/?p=16</link>
		<comments>http://www.muck.net/?p=16#comments</comments>
		<pubDate>Mon, 08 Oct 2007 17:41:38 +0000</pubDate>
		<dc:creator>Doug Peterson</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Zabbix]]></category>
		<category><![CDATA[centos5]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[RedHat Enterprise Linux]]></category>
		<category><![CDATA[rhel5]]></category>

		<guid isPermaLink="false">http://www.muck.net/?p=16</guid>
		<description><![CDATA[If you&#8217;re not familiar with linux or open source tools, finding all the dependencies, downloading the source, compiling source, creating the db, etc can be a daunting task. So I&#8217;ve created this cut and paste walk through to help you through those steps. Almost everything here is cut and paste, except for hostname, and password [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re not familiar with linux or open source tools, finding all the dependencies, downloading the source, compiling source, creating the db, etc can be a daunting task. So I&#8217;ve created this cut and paste walk through to help you through those steps. Almost everything here is cut and paste, except for hostname, and password information <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You&#8217;ll need to provide those on your own. I&#8217;ve done my best  to make this as accurate as possible. I hate walkthroughs that just aren&#8217;t accurate! CentOS was installed choosing zero options, with as base of an installation as it would let me. I used the 2.6.18-8 kernel. If you have any questions, or find any errors, please let me know. And of course as usual, if you find it helpful, also, please let me know <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I wrote these instructions using 1.4.1 as the example, but theres no reason why 1.4.2 shouldn&#8217;t work the same way <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Update, 11/4/2007: 1.4.2 seems to install its binaries under prefix/sbin instead of prefix/bin, which is different than 1.4.1 which was used for this document. I&#8217;ve also noticed that when copying and pasting from this guide some of the whitespace, apostrophies, and dashes (&#8217; &#8211; ) seem to get distorted upon pasting. Its correct in the source, but when its displayed something is munged up. When I figure out what it is, I&#8217;ll fix it. In the meantime if you get a syntax error, try retyping what I&#8217;ve put on this page instead of copying and pasting. And if you know why its happening, let me know! <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Install all the necessary pieces. I started with a very base installation of CentOS 5.</p>
<blockquote><p>yum -y install ntp php php-bcmath php-gd php-mysql httpd mysql gcc mysql-server mysql-devel net-snmp net-snmp-utils net-snmp-devel net-snmp-libs curl-devel mak</p></blockquote>
<p>Start up the time server. its important for the time between your devices to be in sync.</p>
<blockquote></blockquote>
<blockquote><p>/etc/init.d/ntpd start</p></blockquote>
<p>Download fPing, and install it:</p>
<blockquote><p>wget http://dag.wieers.com/rpm/packages/fping/fping-2.4-1.b2.2.el5.rf.i386.rpm</p>
<p>rpm -Uvh  fping-2.4-1.b2.2.el5.rf.i386.rpm</p>
<p>chmod 7555 /usr/sbin/fping</p></blockquote>
<p>Create Zabbix user.</p>
<blockquote><p>useradd zabbix</p></blockquote>
<p>Download zabbix and untar it.</p>
<blockquote><p> wget http://superb-east.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.4.1.tar.gz</p></blockquote>
<blockquote><p> tar -xzvf zabbix-1.4.1.tar.gz</p></blockquote>
<p>Start MySQL, and change the root password.</p>
<blockquote><p> /etc/init.d/mysqld start</p></blockquote>
<blockquote><p> /usr/bin/mysqladmin -u root password YourFancyNewRootPassword</p></blockquote>
<p>Connect to the DB using your newly created root password. Create the zabbix DB, and assign a new user (zabbixmysqluser) with privileges to that DB. You may want to change &#8220;zabbixmysqlpassword&#8221; to something else. But it should not be the same as any other &#8220;critical&#8221; password because it will be stored plain text in a config file.</p>
<blockquote><p>mysql -u root -p</p>
<p>mysql&gt; CREATE DATABASE zabbix;</p>
<p>mysql&gt; GRANT DROP,INDEX,CREATE,SELECT,INSERT,UPDATE,ALTER,DELETE ON zabbix.* TO zabbixmysqluser@localhost IDENTIFIED BY &#8216;zabbixmysqlpassword&#8217;;</p>
<p>mysql&gt; quit;</p></blockquote>
<p>Create the DB Schema</p>
<blockquote><p>cd zabbix-1.4.1</p>
<p>cat create/schema/mysql.sql  | mysql -u zabbixmysqluser -pzabbixmysqlpassword zabbix</p></blockquote>
<blockquote><p> cat create/data/data.sql  | mysql -u zabbixmysqluser -pzabbixmysqlpassword  zabbix</p></blockquote>
<blockquote><p> cat create/data/images_mysql.sql  | mysql -u zabbixmysqluser -pzabbixmysqlpassword  zabbix</p></blockquote>
<blockquote><p>./configure &#8211;enable-server &#8211;prefix=/usr/local/zabbix &#8211;with-mysql &#8211;with-net-snmp &#8211;with-libcurl</p></blockquote>
<blockquote><p> make install</p></blockquote>
<blockquote><p> make clean</p></blockquote>
<p>Compile the agent. I chose to compile it staticly, so it can be copied easily to other hosts.</p>
<blockquote><p> ./configure &#8211;enable-agent &#8211;prefix=/usr/local/zabbix &#8211;enable-static</p></blockquote>
<blockquote><p> make install</p></blockquote>
<p>Add the zabbix server and agent ports to your /etc/services file.</p>
<blockquote><p>echo &#8216;zabbix_agent 10050/tcp&#8217; &gt;&gt; /etc/services</p>
<p>echo &#8216;zabbix_trap 10051/tcp&#8217; &gt;&gt; /etc/services</p></blockquote>
<p>Copy the sample configs to /etc/zabbix for server and agentd.</p>
<blockquote><p> mkdir /etc/zabbix</p>
<p>cp misc/conf/zabbix_agentd.conf /etc/zabbix</p>
<p>cp misc/conf/zabbix_server.conf /etc/zabbix</p></blockquote>
<p>in /etc/zabbix/zabbix_server.conf, modify:</p>
<blockquote><p>DBUser=zabbixmysqluser</p>
<p>BPassword=zabbixmysqlpassword</p>
<p>DBSocket=/var/lib/mysql/mysql.sock</p>
<p>FpingLocation=/usr/sbin/fping</p></blockquote>
<p>in /etc/zabbix/zabbix_agentd.conf, modify:</p>
<blockquote><p>Server=127.0.0.1,Your.Zabbix.Server.IP</p>
<p>Hostname=EnterAUniqueHostNameForEachAgent</p></blockquote>
<blockquote><p>cp misc/init.d/redhat/zabbix_agentd_ctl /etc/init.d/zabbix_agentd<br />
cp misc/init.d/redhat/zabbix_server_ctl /etc/init.d/zabbix_server</p></blockquote>
<p>in /etc/init.d/zabbix_agentd AND /etc/init.d/zabbix_server:</p>
<blockquote><p>BASEDIR=/usr/local/zabbix</p></blockquote>
<p>in /etc/init.d/zabbix_agentd (Note the # hash marks, they are necessary), add near the top, just below #!/bin/sh:</p>
<blockquote><p># chkconfig: 345 95 95<br />
# description: Zabbix Agentd</p></blockquote>
<p>in /etc/init.d/zabbix_server (again, note the # Hash marks, they are required), add near the top, just below #!/bin/sh:</p>
<blockquote><p># chkconfig: 345 95 95<br />
# description: Zabbix Server</p></blockquote>
<p>Configure automatic starting and stopping of services.</p>
<blockquote><p> chkconfig &#8211;level 345 zabbix_server on</p>
<p>chkconfig &#8211;level 345 zabbix_agentd on</p>
<p>chkconfig &#8211;level 345 httpd on</p>
<p>chkconfig &#8211;level 345 mysqld on</p>
<p>chkconfig &#8211;level 0123456 iptables off</p>
<p>/etc/init.d/iptables stop</p></blockquote>
<p>Note: I turn the iptables firewall OFF because my  box is behind a firewall. You should consult with your network folks before turning off the firewall. At the very least you should poke holes for port 80, 10050, and 10051 in the firewall.</p>
<blockquote><p>cp -r frontends/php /var/www/html/zabbix</p></blockquote>
<p>in /etc/php.ini, modify:</p>
<blockquote><p>max_execution_time = 300</p>
<p>date.timezone = America/Los_Angeles</p></blockquote>
<p>Note: Obviously you should substitute your own time zone. For a list of all valid timezones, <a href="http://us2.php.net/manual/en/timezones.america.php" target="_blank">click here</a></p>
<blockquote><p> /etc/init.d/httpd start</p></blockquote>
<blockquote><p>chmod 777 /var/www/html/zabbix/conf</p></blockquote>
<p>Launch http://your.servers.name/zabbix inyour browser. You should be prompted with a setup screen. Click through the user agreement, and when you get to the Pre requisites screen, make sure you have a green OK next to everything.</p>
<p><a href="http://www.muck.net/wp-content/uploads/2007/10/zabbix_prereq_small.jpg" title="Zabbix pre req’s"><img src="http://www.muck.net/wp-content/uploads/2007/10/zabbix_prereq_small.jpg" alt="Zabbix pre req’s" /></a></p>
<p><a href="http://www.muck.net/wp-content/uploads/2007/10/zabbix_db_small.jpg" title="Zabbix DB config"><img src="http://www.muck.net/wp-content/uploads/2007/10/zabbix_db_small.jpg" alt="Zabbix DB config" /></a></p>
<p>When you&#8217;ve finished walking through the web interface setup:</p>
<blockquote><p>chmod 755 /var/www/html/zabbix/conf</p>
<p>mv /var/www/html/zabbix/setup.php  /var/www/html/zabbix/setup.php.bak</p></blockquote>
<blockquote><p> /etc/init.d/zabbix_agentd start</p>
<p>/etc/init.d/zabbix_server start</p></blockquote>
<p>You can now login to your zabbix installation by going to http://your.server.name/zabbix, using the username &#8220;admin&#8221;, with no password. To monitor your zabbix server, you can go to the Configuration Tab, and choose the &#8220;hosts&#8221; sub Tab. Select the &#8220;Zabbix Server&#8221; host, by putting a checkmark next to it. and choose the &#8220;Activate Selected&#8221; button below. Wait a minute or two, then select the &#8220;Monitoring&#8221; tab, and then the &#8220;latest data&#8221; sub tab. You should start seeing performance stats appear!</p>
<p>For Reference, your binaries are under /usr/local/zabbix/bin, and your configuration files are in /etc/zabbix.</p>
<p>I&#8217;m not a big fan of their default template, I think the naming sucks. Look for a future article talking about renaming zabbix items. But this should be enough to get you started! <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You can find the answers to most of your questions in the Zabbix manual, available here: <a href="http://www.zabbix.com/documentation.php" target="_blank">http://www.zabbix.com/documentation.php .</a> You can also find lots of answers in the <a href="http://www.zabbix.com/forum/" target="_blank">zabbix forums</a> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muck.net/?feed=rss2&amp;p=16</wfw:commentRss>
		<slash:comments>80</slash:comments>
		</item>
		<item>
		<title>Getting hard disk performance stats from zabbix</title>
		<link>http://www.muck.net/?p=19</link>
		<comments>http://www.muck.net/?p=19#comments</comments>
		<pubDate>Thu, 04 Oct 2007 07:33:29 +0000</pubDate>
		<dc:creator>Doug Peterson</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Zabbix]]></category>
		<category><![CDATA[centos5]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[RedHat Enterprise Linux]]></category>
		<category><![CDATA[rhel5]]></category>

		<guid isPermaLink="false">http://www.muck.net/?p=19</guid>
		<description><![CDATA[I like zabbix&#8230; but it annoys me that it&#8217;s ops per second, and bytes per second data is broken for hard drives in the linux 2.6 kernel. So I created a work around  
Add the following  code to your zabbix_agentd.conf file (/etc/zabbix/zabbix_agentd.conf by default), and restart the zabbix agent:
UserParameter=custom.vfs.dev.read.ops[*],cat /proc/diskstats &#124; grep $1 [...]]]></description>
			<content:encoded><![CDATA[<p>I like zabbix&#8230; but it annoys me that it&#8217;s ops per second, and bytes per second data is broken for hard drives in the linux 2.6 kernel. So I created a work around <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Add the following  code to your zabbix_agentd.conf file (/etc/zabbix/zabbix_agentd.conf by default), and restart the zabbix agent:</p>
<blockquote><p>UserParameter=custom.vfs.dev.read.ops[*],cat /proc/diskstats | grep $1 | head -1 | awk &#8216;{print $$4}&#8217;<br />
UserParameter=custom.vfs.dev.read.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk &#8216;{print $$7}&#8217;<br />
UserParameter=custom.vfs.dev.write.ops[*],cat /proc/diskstats | grep $1 | head -1 | awk &#8216;{print $$8}&#8217;<br />
UserParameter=custom.vfs.dev.write.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk &#8216;{print $$11}&#8217;<br />
UserParameter=custom.vfs.dev.io.active[*],cat /proc/diskstats | grep $1 | head -1 | awk &#8216;{print $$12}&#8217;<br />
UserParameter=custom.vfs.dev.io.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk &#8216;{print $$13}&#8217;<br />
UserParameter=custom.vfs.dev.read.sectors[*],cat /proc/diskstats | grep $1 | head -1 | awk &#8216;{print $$6}&#8217;<br />
UserParameter=custom.vfs.dev.write.sectors[*],cat /proc/diskstats | grep $1 | head -1 | awk &#8216;{print $$10}&#8217;</p></blockquote>
<p>The names are pretty descriptive, but you can find more information on how to decipher /proc/diskstats here:   <a href="http://www.kernel.org/pub/linux/kernel/people/landley/kdocs/Documentation/iostats.txt" target="_blank">http://www.kernel.org/pub/linux/kernel/people/landley/kdocs/Documentation/iostats.txt</a></p>
<p>After you add the UserParameter&#8217;s to your config file, you can check that they work by using zabbix_get from your zabbix server:</p>
<blockquote><p> zabbix_get -s HostName -p 10050 -k custom.vfs.dev.write.ops[sdb]</p></blockquote>
<p>It should return a large number, and not something like: ZBX_NOTSUPPORTED. If it comes back not supported, make sure you restarted the agent after adding the userparameters. Then try running the commands outside of zabbix. Note that if you run the commands outsie of zabbix, you&#8217;ll need to replace the first $1 with a disk name, and remove one of the $ characters from the awk command.</p>
<p>Once  you&#8217;ve verfied everything is in working order, you can add it as an item to your zabbix installation:</p>
<p>You can download my exported Template <a href="http://www.muck.net/pub/zabbix_FileServer_template.xml" target="_blank">here</a> , which will create a template called Template_app_FileServer. It will give you:</p>
<p>Disk Read/Write: Bytes/sec (or KB, MB per second)</p>
<p>Disk Read/Write: Ops/second</p>
<p>Disk Read/Write: Milliseconds spent reading or writing</p>
<p>Disk:IO currently executing</p>
<p>Disk:IO ms: time spent performing IO</p>
<p>If you&#8217;d rather just create your own items, and not bother loading mine, I have attached some screenshots of the config screens, so you can re create it with the right settings:</p>
<p><a href="http://www.muck.net/wp-content/uploads/2007/10/chart2.png" title="Bytes/sec chart"><img src="http://www.muck.net/wp-content/uploads/2007/10/chart2.png" alt="Bytes/sec chart" /></a></p>
<p><a href="http://www.muck.net/wp-content/uploads/2007/10/zabbix_bytes_sec_config.JPG" title="Bytes/Sec config"><img src="http://www.muck.net/wp-content/uploads/2007/10/zabbix_bytes_sec_config.JPG" alt="Bytes/Sec config" /></a></p>
<p><a href="http://www.muck.net/wp-content/uploads/2007/10/zabbix_ops_sec_config.JPG" title="Operations/sec config"><img src="http://www.muck.net/wp-content/uploads/2007/10/zabbix_ops_sec_config.JPG" alt="Operations/sec config" /></a></p>
<p><a href="http://www.muck.net/wp-content/uploads/2007/10/zabbix_io_config.JPG" title="active IO config"><img src="http://www.muck.net/wp-content/uploads/2007/10/zabbix_io_config.JPG" alt="active IO config" /></a></p>
<p>As always, if you find this page helpful or have any questions, please let me know! <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.muck.net/?feed=rss2&amp;p=19</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Support Your Local Farmer</title>
		<link>http://www.muck.net/?p=14</link>
		<comments>http://www.muck.net/?p=14#comments</comments>
		<pubDate>Sat, 22 Sep 2007 22:42:43 +0000</pubDate>
		<dc:creator>Doug Peterson</dc:creator>
				<category><![CDATA[Food]]></category>

		<guid isPermaLink="false">http://www.muck.net/?p=14</guid>
		<description><![CDATA[I&#8217;m pavement locked. I&#8217;m surrounded by a sprawling wasteland of pavement, condo&#8217;s, congestion, and trees that grow in a straight line. The vegetables at my local safeway/lucky/etc are horrible. I also have a strong history with food (and it shows in my waistline&#8230;). As soon as I could eat something other than breast milk, instead [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m pavement locked. I&#8217;m surrounded by a sprawling wasteland of pavement, condo&#8217;s, congestion, and trees that grow in a straight line. The vegetables at my local safeway/lucky/etc are horrible. I also have a strong history with food (and it shows in my waistline&#8230;). As soon as I could eat something other than breast milk, instead of buying baby food, my mom was pureeing vegetables from the garden. She was/is a dietitian (she now teaches at Cal Poly, San Luis Obispo), and a firm believer in &#8220;good food&#8221;. That means good tasting food, with lots of seasonal variety. Our eggs came from the chickens in our barn. Every year a head of cattle would disappear, and a week or two later, the freezer in the garage was full of white packages.  Apparently my parents once decided to butcher their own chicken. 26 years later their stories conflict, but someone didn&#8217;t have the heart to dispatch the chicken in <a href="http://www.ehow.com/how_2073845_butcher-chicken.html" target="_blank">traditional ways</a> , so my dad shot it. With a 20 gauge.  My mom picked buckshot from a chicken once, and from then on, the Peterson family chicken dinners came from the super market.</p>
<p>The result of these forming years of my life, is that I like good, fresh food. I am ALSO a firm believer in spending your money like you&#8217;re voting with it. So I do my best to buy locally. I&#8217;m not a zealot, or obsessive about this practice, but when its possible, I do my best. One way that I do this is by supporting my <a href="http://www.twosmallfarms.com" target="_blank">local farmer</a>  through their <a href="http://en.wikipedia.org/wiki/Community-supported_agriculture" target="_blank">CSA</a>  (Community Support Agriculture) program.</p>
<p>Every week, I get a box full of organic <a href="http://www.mariquita.com/membership/schedule.html" target="_blank">seasonal fruits and vegetables</a> . Strawberries, tomatoes, peppers, cauliflower, peas, carrots, onions, beets, squash, baby salads, big salads, spinach, potatoes, etc. Anything that grows in California between April and November.  Its a great way to get fresh fruits and vegetables into my diet, which is obviously good for me. I send my check directly to the farmer, eliminating the middle man, which is good for the farmer. These types of programs are available all over the place. A good place to start your search is <a href="http://www.localharvest.org/csa/" target="_blank">LocalHarvest.org</a></p>
<p>Periodically Mariquita farms (half of two small farms), will have a U pick tomato day. For 50 cents a pound, you can pick all the tomatoes you can carry out of there. Its fabulous. You&#8217;re not limited to tomatoes either. Peppers, pumpkins, tomatillos, or anything else you can get your hands on is fair game. 50 cents a pound is great. But I&#8217;m a really inquisitive person, so to ME the best part is that you get to <a href="http://www.ladybugletter.com/" target="_blank">pick the farmers brain</a> , and ask him all the dumb questions you want. He&#8217;s HAPPY to answer them! Its an excellent experience.</p>
<p>Mariquita is having one of these <a href="http://www.mariquita.com/events/tomatopick82007.htm" target="_blank">U Pick</a>  days  tomorrow, Sunday September, 23rd. If you get a chance, its worth the drive. Just make sure you wear a good pair of boots, its going to be wet out there <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here are some pictures of my bounty from the last U Pick day.</p>
<p><img src="http://mucknet.smugmug.com/photos/188087450-M.jpg" height="450" width="600" /></p>
<p><img src="http://mucknet.smugmug.com/photos/188087918-M.jpg" height="450" width="600" /></p>
<p><img src="http://mucknet.smugmug.com/photos/188087998-M.jpg" height="450" width="600" /></p>
<p><img src="http://mucknet.smugmug.com/photos/188088239-M.jpg" height="450" width="600" /></p>
<p><img src="http://mucknet.smugmug.com/photos/188086746-M.jpg" height="450" width="600" /></p>
<p><img src="http://mucknet.smugmug.com/photos/188087374-M.jpg" height="450" width="600" /></p>
<p>Update: Heres my bounty from the second U Pick day <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Can you tell I like salsa? I preserved most of it for the winter <img src='http://www.muck.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img src="http://mucknet.smugmug.com/photos/199606311-M.jpg" height="450" width="600" /></p>
<p><img src="http://mucknet.smugmug.com/photos/199607995-M.jpg" height="450" width="600" /></p>
<p><img src="http://mucknet.smugmug.com/photos/199600071-M.jpg" height="450" width="600" /></p>
<p><img src="http://mucknet.smugmug.com/photos/199601014-M.jpg" height="450" width="600" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.muck.net/?feed=rss2&amp;p=14</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
