Archive for the 'Linux Support' Category

SBDavid

The munin.conf configuration file

The munin.conf configuration file.

Open the file /etc/munin/munin.conf so that you can change a couple important settings.

# Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime
# something changes (OK -> WARNING, CRITICAL -> OK, etc)
#contact.someuser.command mail -s “Munin notification” somejuser@fnord.comm
#contact.anotheruser.command mail -s “Munin notification” anotheruser@blibb.comm

You can use the example above in the munin.conf as a template to add your own email notifications.

The “host tree” section of munin.conf describes the organization of any monitored nodes on munin’s overview page. Setting up one node on the same server leave the default address of 127.0.0.1 alone. You might want to change the host tree name to something more descriptive.

# a simple host tree
[localhost]
address 127.0.0.1
use_node_name yes

Open the /etc/munin/munin-node.conf file and look for an entry with “host”.

Now to restrict the node to listen to localhost only, you should change the host entry to:

# Which address to bind to;
host 127.0.0.1

start the munin-node service

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

To make sure the munin-node service starts on reboot.

sudo /sbin/chkconfig munin-node on

munin - network-wide graphing framework (grapher/gatherer)

A monitoring tool like munin lets you watch your server resource use over time. The graphs will highlight issues before they cause downtime or bandwidth quota overages.

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.

To download and install the munin master package and munin node package to your master server, run the following command:

# yum install munin munin-node
SBDavid

MySQL Proxy Server

MySQL Proxy Server

The MySQL Proxy is an application that communicates over the network using the MySQL Network Protocol and provides communication between one or more MySQL servers and one or more MySQL clients. In the most basic configuration, MySQL Proxy simply passes on queries from the client to the MySQL Server and returns the responses from the MySQL Server to the client.

To install, unpack the archive into the desired directory, and then modify your PATH environment variable so that you can use the mysql-proxy command directly:

# cd /usr/local
# tar zxf mysql-proxy-0.7.2-osx10.5.tar.gz
# PATH=$PATH:/usr/local/mysql-proxy-0.7.2-osx10.5-x86/sbin

If you want to update the path globally on a system, you may need administrator privileges to modify the appropriate /etc/profile, /etc/bashrc, or other system configuration file.

Reference: http://dev.mysql.com/

Running Multiple MySQL Servers on Linux

The easiest way is to run multiple MySQL servers on Linux is to compile them with different TCP/IP ports and Unix socket files so that each one is listening on different network interfaces. Compiling in different base directories for each installation also results automatically in a separate, compiled-in data directory, log file, and PID file location for each server.

Assume that an existing 5.0.19 server is configured for the default TCP/IP port number (3306) and Unix socket file (/tmp/mysql.sock). To configure a new 5.5.4 server to have different operating parameters, use a configure command something like this:

# ./configure –with-tcp-port=port_number \
–with-unix-socket-path=file_name \
–prefix=/usr/local/mysql-5.5.4

Here, port_number and file_name must be different from the default TCP/IP port number and Unix socket file path name, and the –prefix value should specify an installation directory different from the one under which the existing MySQL installation is located.

Reference: http://dev.mysql.com/

Finding MySQL server operating parameters

If you have a MySQL server listening on a given port number, you can use the following command to find out what operating parameters it is using for several important configurable variables, including the base directory and Unix socket file name:

# mysqladmin –host=host_name –port=port_number variables

With the information displayed by that command, you can tell what option values not to use when configuring an additional server.

« Prev - Next »