Table of Contents

Overview

db.offbyone.lan is a MySQL server for use with LAIR resources.

hostname RAM disk swap OS Kernel
db.offbyone.lan 192MB 4GB (/) 256MB Debian 6.0 “Squeeze” (AMD64) 2.6.32-5-xen-amd64

sokraits.offbyone.lan created on sokraits on 10/29/2010. I followed the instructions used to build lab46 and irc, which I need to break out into a standalone page at some point.

News

TODO

Xen Config

The Xen config file for this VM is as follows:

##########################################################################
# LAIR Xen VM configuration file
##########################################################################

#################################################
#  Kernel + memory size
#
kernel  = '/boot/vmlinuz-2.6.26-2-xen-amd64'
ramdisk = '/boot/initrd.img-2.6.26-2-xen-amd64'
memory  = '192'
vcpus   = '1'
#extra   = 'clocksource=jiffies'

#################################################
#  Disk device(s).
#
root    = '/dev/xvda1 ro'
disk    = [ 'file:/xen/images/db.disk,xvda1,w',
            'file:/xen/images/db.swap,xvda2,w'  ]

#################################################
#  Hostname
#
name    = 'db'

#################################################
#  Networking
#
dhcp    = 'dhcp'
vif     = [ 'mac=00:16:3E:39:ED:8F' ]

#################################################
#  Behaviour
#
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'

Network Configuration

Machine Interface IP Address MAC Address Other Names
db.offbyone.lan eth0 10.80.2.7 00:16:3E:39:ED:8F

Packages

The following packages have been installed on db:

lair-std
lair-vm
lair-nfs
zabbix-agent
mysql-server

Zabbix client config

To set db up as a Zabbix client (it is the test client for the Zabbix deployment), we have the following configuration files. Zabbix config information resides in: /etc/zabbix

zabbix_agentd.conf

First up:

##
## zabbix_agentd.conf - configuration file for Zabbix Agent
##

############ GENERAL PARAMETERS #################
Server=monitor.offbyone.lan
Hostname=db
StartAgents=5
DebugLevel=3
PidFile=/var/run/zabbix-agent/zabbix_agentd.pid
LogFile=/var/log/zabbix-agent/zabbix_agentd.log
Timeout=3

####### USER-DEFINED MONITORED PARAMETERS #######
# Format: UserParameter=<key>,<shell command>
# Note that shell command must not return empty string or EOL only
#UserParameter=system.test,who|wc -l
### Set of parameter for monitoring MySQL server (v3.23.42 and later)
### Change -u<username> and add -p<password> if required
#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
#UserParameter=mysql.version,mysql -V

zabbix_agent.conf

##
## zabbix_agent.conf - config file for Zabbix agent
##

##
## Configuration
##
Server=monitor.offbyone.lan
Timeout=3

####### USER-DEFINED MONITORED PARAMETERS #######
# Format: UserParameter=<key>,<shell command>
# Note that shell command must not return empty string or EOL only
#UserParameter=system.test,who|wc -l
### Set of parameter for monitoring MySQL server (v3.23.42 and later)
### Change -u<username> and add -p<password> if required
#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
#UserParameter=mysql.version,mysql -V