Archive for June, 2007

Censored

Saturday, June 16th, 2007
CENSORED
Originally uploaded by Reiner1.

There’s an uprising at Flickr that’s very similar to the Digg revolt. I think fighting for freedom of speech is a better cause though.

Hey PodShow!

Thursday, June 14th, 2007

Want to suck less? Stop playing that annoying song!

How to Install Munin on CEntOS

Thursday, June 14th, 2007

Munin is a monitoring tool for servers. It uses RRDtool to log and graph data from your servers. The plugin API is very easy to grasp. Actually, I haven’t read the API documentation yet. I just looked at the output of the plugins and it looks easy to achieve. The data can be accessed through the web.

This guide will walk you through installing and configuring Munin on CEntOS 4.3/4.4 x86. The steps are pretty much the same for later releases of CEntOS, Red Hat, Fedora [Core] and/or Red Hat-based installations.

Munin works by polling your servers for the data hence two applications, Munin and Munin Node. The former periodically gathers data (cronned) and the latter serves the data to the former. Please refer to the following for our example configuration. You can make up a domain if you want Munin to group your servers similar to the live demo.

Munin “Graph Server” - alpha.sample.net (192.168.1.1)
A Munin Node - bravo.sample.net (192.168.1.2)

1. Installing and Configuring Munin

In this section, we set it up on alpha.sample.net

  1. Add the RPMforge repository.
    rpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm
    This step is optional if your Linux distribution has the packages in its default repositories. For other versions and architectures, click here.
  2. Install munin.
    yum -y install munin

  3. Change the ownership of the Munin web docroot to munin.
    chown -R munin:munin /var/www/munin
  4. The default configuration file (in version 1.2.5-1) the value for the web docroot points to the wrong directory. Replace the value of htmldir from /var/www/html/munin to /var/www/munin at /etc/munin/munin.conf (line 7).
  5. Restart Apache and Cron
    service httpd restart && service crond restart
  6. You can check if it’s working through your browser (i.e. http://192.168.1.1/munin/). You will get a 404 (not found) if you don’t supply a trailing slash.

2. Add a Node

In this section, we will configure bravo.sample.net.

  1. Add the RPMforge repository (see 1.1).
  2. Install Munin Node.
    yum -y install munin-node
  3. Configure. Edit /etc/munin/munin-node.conf with your favorite text editor.
    • Allow the graph server (alpha.sample.net/192.168.1.1) to poll the node.
      allow ^192\.168\.1\.1$
    • If your server doesn’t report the correct hostname, add the following line
      host_name bravo.sample.net
    • If your servers have two interfaces and on the same LAN (e.g. one for Internet and another for LAN), you can configure the node to bind and listen on the local interface by changing the value of host (line 13) from * to the local IP of the node.
  4. Start munin-node and set to start on bootup.
    service munin-node start
    chkconfig munin-node on
  5. Edit Munin’s configuration on the graph server (/etc/munin/munin.conf).
    [bravo.sample.net]
    address 192.168.1.2
    use_node_name yes

Wait for at least 5 minutes for the new node to appear. You can also install the node on the graph server. The default node configuration will work out of the box.

3. Install/Activate Some Plugins

This section should familiarize you with the plugin installation routine. Plugins are installed in the nodes.

  • Apache
    1. Create a symbolic link to the Apache plugins (stored in /usr/share/munin/plugins) in the plugin folder.
      ln -s /usr/share/munin/plugins/apache_* /etc/munin/plugins/

    2. Enable server status reports. Add the following to Apache’s configuration file.
      ExtendedStatus On
      <Location /server-status>
      SetHandler server-status
      Order Deny,Allow
      Deny from all
      Allow from 127.0.0.1
      </Location>
    3. Restart Apache and the node
      service httpd restart && service munin-node restart
  • Asterisk
    1. Download the plugins for your Asterisk version from here.
    2. Extract them to /usr/share/munin/plugins.
    3. Make the files executable
      chmod 755 /usr/share/munin/plugins/asterisk_*

    4. Configure Asterisk Manager by adding/changing the following in /etc/asterisk/manager.conf
      [general]
      enabled = yes
      port = 5038

      [munin]
      secret = somepassword
      permit = 127.0.0.1 ;if this doesn’t work, use the local IP
      write = system,call,log,verbose,command,agent,user

    5. Add the following to the plugin configuration file in /etc/munin/plugin-conf.d/munin-node
      [asterisk_*]
      env.username munin
      env.secret somepassword
    6. Reload Asterisk’s configuration and restart the node.
      asterisk -rx reload >> /dev/null && service munin-node restart
  • MySQL
    1. Create a symbolic link to the MySQL plugins (stored in /usr/share/munin/plugins) in the plugin folder.
      ln -s /usr/share/munin/plugins/mysql_* /etc/munin/plugins/
    2. If your root user has a password (or want to use a different user), edit the plugin configuration file in /etc/munin/plugin-conf.d/munin-node and uncomment line 16 by removing the leading hash (#). Then change the parameters that will be used when mysqladmin is run.
    3. Restart the node
      service munin-node restart
  • MTR
    1. Make sure you have the latest version of MTR.
      yum -y install mtr && yum -y update mtr
    2. Download the plugin here (direct link)
    3. Extract to /usr/share/munin/plugins
    4. Make the file executable.
      chmod 755 /usr/share/munin/plugins/mtr100_
    5. Create a symbolic link to the plugin (stored in /usr/share/munin/plugins) in the plugin folder. Append the host that you want to query to the link of the name.
      ln -s /usr/share/munin/plugins/mtr100_ /etc/munin/plugins/mtr100_somehost.com
    6. To add another host to query, just create another symbolic link.
    7. Add the following to the plugin configuration file in /etc/munin/plugin-conf.d/munin-node
      [mtr100_*]
      timeout 60
    8. Restart the node
      service munin-node restart

4. Links

Bookmarks for 2007.06.12

Tuesday, June 12th, 2007

Malayang Malaya

Monday, June 11th, 2007

In celebration of 109 years of freedom, we modified the theme for our Independence Day at !people and named it 2007 Kalayaan.

!people 2007 Kalayaan Theme
click to embiggen

By the way, you might’ve noticed that I’ve been posting less frequent here. I didn’t stop blogging, I’ve been posting there more instead. So if you miss my posts (fat chance), join there. Everybody’s welcome.

Mabuhay ang Pilippinas!

Fedora 7 Review

Monday, June 11th, 2007

Click here

Install Fedora 7 Without A DVD Drive

Saturday, June 9th, 2007

There are other ways to install Fedora 7 if you don’t have a DVD drive. I’m cheap enough to keep an old laptop with only a CD-ROM drive yet foolish enough to buy a 60GB iPod. In this entry, I’ll share how I worked around to getting Fedora 7 installed.

I tried two of the installation methods. First I tried a network install. This took a lot of time and the minimal boot loader doesn’t show the status of the download. You can hit alt+F3 and see more messages but that barely helped. I tried to download the portion of the mirror that was needed but majority of the mirrors were slow.

This is not the first time where I tried a network install. I tried it before with openSUSE and had the same problems, ending up with downloading the ISOs. I was first hesitant to try this but I thought that a DS3 line will work compared to 512kbps DSL.

The second method I tried was from a hard drive. I first tried it with a USB enclosure with an NTFS-formatted drive but it seems that the boot loader had this problem with mounting the partition. But that didn’t stop me from giving up. I still have my FAT32-formatted iPod and the boot loader was able to mount it.

That’s pretty much it. Here’s what I did in 5 steps (plus other options for your configuration) to reach the welcome screen.

  1. Download a minimal boot loader (either the CD ISO image or the bootable USB image; check if your computer can boot from a USB device, the safest way is to burn the minimal ~7MB CD ISO).
  2. Download the DVD image via BitTorrent and copy it to a self-managed iPod or an external FAT32-formatted hard disk. Do not rename the image file and remember where you copied it. As an alternative, you can also store it in a FAT32 partition that you will not format during the installation.
  3. Restart your computer and boot with the minimal installer.
  4. Choose “Hard Drive” as the installation source.
  5. Provide the path where the image is stored. If you’re having a hard time locating it, you can refer to the sample table in this page.

It’ll be smooth sailing once anaconda, the installation program, loads properly. Stay tuned for my post-installation assessment.

It’s Probably Just Me…

Thursday, June 7th, 2007

…but I don’t like the improvements to the YouTube player. It feels like it slows down playback and gets too much in the way.

Bookmarks for 2007.06.07

Thursday, June 7th, 2007

Look at What I Found

Tuesday, June 5th, 2007

Neon socks!!