Skip to content

Shiner Family Reunion

2012 January 22
by dlarmeir

There’s nothing that comes in the Shiner family reunion box that I don’t like.

Shiner beer rocks!

How to install Munin on CentOS 6 and RedHat Enterprise 6

2012 January 7
by dlarmeir

This guide will go over a basic installation of Munin on a CentOS 6.x or RedHat Enterprise 6.x server.

Per Munin’s site “Munin is a networked resource monitoring tool that can help analyze resource trends and “what just happened to kill our performance?” problems. It is designed to be very plug and play. A default installation provides a lot of graphs with almost no work.

I personally deploy it on my own Linux systems for resource monitoring. Let’s jump into the installation:

 

1. The first step is to install the RedHat EPEL rpm which adds the EPEL repo:

# rpm -ivh http://download.fedora.redhat.com/pub/epel/6/ppc64/epel-release-6-5.noarch.rpm

2. Next, you’ll need to install the required packages via yum:

# yum install -y munin munin-node

3. Once installed, we need to configure the munin-node via the /etc/munin/munin-node.conf and alter the following values:

user root
group root

For security reason, I like to change this to a less risky user such as apache I.e.:

user apache
group apache

You can also alter the listening address and port that the service runs on:

# Which address to bind to;
host *
# host 127.0.0.1

# And which port
port 4949

I generally leave this setting alone as my servers run behind a firewall that blocks external access to the port.  If you are exposed to the internet (I’d at least run iptables) then I’d change the bind address value to 127.0.0.1

4. Now that the node is configured, the next step is to adjust the following values in /etc/munin/munin.conf:

# dbdir /var/lib/munin
# htmldir /var/www/html/munin
# logdir /var/log/munin
# rundir  /var/run/munin

You can simply uncomment these values and adjust the htmldir accordingly dpending on where you would like the files to be generated.

Example is below:

dbdir /var/lib/munin
htmldir /var/www/vhosts/somedomain/htdocs
logdir /var/log/munin
rundir  /var/run/munin

The host tree should be adjusted as well:

# a simple host tree
[enter.yourservernamehere]
address 127.0.0.1
use_node_name yes

You can set a custom name for your server where indicated above.

5. Once the munin.conf has been updated, next you’ll need to adjust the permissions on the html directory. In the example above I set my html directory to /var/www/vhosts/somedomain/htdocs so to allow munin to write to it I’ll change ownership to the correct user:

chown munin:munin /var/www/vhosts/somedomain/htdocs

6. Now you can start the munin daemon with the following command:

# /etc/init.d/munin-node start

Once done you can verify the service with ps and netstat:

#ps aux | grep munin
apache   17835  0.2  0.8 141140  8480 ?        Ss   07:51   0:00 /usr/sbin/munin-node
root     18186  0.0  0.0 103220   844 pts/0    S+   07:52   0:00 grep munin

# netstat -anp | grep munin-node
tcp        0      0 0.0.0.0:4949                0.0.0.0:*                   LISTEN      17835/munin-node

In the example above, you can see that the daemon process is running and that it is listening on tcp port 4949.

7. Now we’ll need to use chkconfig to have the service load on startup:

# chkconfig munin-node on
# chkconfig --list | grep munin
munin-node         0:off    1:off    2:on    3:on    4:on    5:on    6:off

That covers the basic installation process and you should be up and running. If you set the html directory to a existing website, you can access it there.

In my case, I setup a dedicated subdomain for my installation and set the html directory to the document root and setup http basic auth to prevent someone from snooping.

I’ll share my nginx configuration for those who use it:

server {
listen      80;
server_name munin.somedomain.com;
access_log /var/www/vhosts/munin.somedomain.com/logs/access.log;
error_log /var/www/vhosts/munin.somedomain.com/logs/error.log;
rewrite_log on;
root    /var/www/vhosts/munin.somedomain.com/htdocs;
index   index.php index.html index.htm;

location  /  {
auth_basic            "Restricted";
auth_basic_user_file  /var/www/vhosts/munin.somedomain.com/auth/.htpasswd;
}

# Enable FastCGI on unix:/tmp/php-fpm.sock
location ~ \.php$ {
fastcgi_pass   unix:/tmp/php-fpm.sock;
fastcgi_index  index.php;
fastcgi_intercept_errors on;
fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
include        fastcgi_params;
}

# Deny hidden file types
location ~ /(\.ht|\.git|\.svn) {
deny  all;
}
}

If you have any questions feel free to comment – Dustin

Happy new year!

2012 January 1
by dlarmeir

I’m really looking forward to 2012!

2011 was a great year and I have no complaints looking back.

God bless everyone!

- Dustin

Sneak peek at my Nginx control panel

2011 December 30
by dlarmeir

Click on the image to zoom in – This is still very alpha, very ugly, and not that fancy.

I’ll keep working on it though and turn it into something more useful :)

BattleField 3 and my ordeal on Christmas eve.

2011 December 28
by dlarmeir

 

I decided to go buy Battlefield 3 from Gamestop so I went there, picked up a slightly used copy, took it home, then fired it up. I was pretty excited as several friends said it was much better than Call of Duty MW3.

It would not work when I tried to run it on Multiplayer mode – It turns out that Gamestop is placing used games on the shelves without the activation codes being reset and not telling anyone. This means that paying customers are inconvenienced by either having to return the game or having to call EA support.

So….. On Christmas eve, I was on the phone with EA support getting this squared away which was pretty annoying. They were very hesitant to help at first ( I completely understand due to piracy concerns) but their service was stellar and they issued me a new code.

I can’t say enough for the service that EA gave to me and it’s refreshing to see a business still giving great customer service out there.

I just hope Gamestop pays attention to this post and does the right thing for their customers….