Categories
blog linux

Munin config example

/etc/munin.conf

# Example configuration file for Munin, generated by ‘make build’
# The next three variables specifies where the location of the RRD
# databases, the HTML output, and the logs, severally. They all
# must be writable by the user running munin-cron.
dbdir /var/lib/munin
htmldir /var/www/munin
logdir /var/log/munin
rundir /var/run/munin

# Where to look for the HTML templates
tmpldir /etc/munin/templates

# Make graphs show values per minute instead of per second
#graph_period minute

# Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime
# something changes (OK -> WARNING, CRITICAL -> OK, etc)

contact.yourname.command mail -s “MUNIN – [${var:host}] ~ ${var:graph_title} ~ warnings: ${loop<,>:wfields ${var:label}=${var:value}} ~ criticals: ${loop<,>:cfields ${var:label}=${var:value}}” your.email@domain.tld

#
#
# For those with Nagios, the following might come in handy. In addition,
# the services must be defined in the Nagios server as well.
#contact.nagios.command /usr/sbin/send_nsca -H nagios.host.com -c /etc/send_nsca.cfg

# a simple host tree
[location1-wms1.otherdomain.tld]
address 169.254.30.86
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
# memory.committed.warn 8589934592
memory.committed.critical 17179869184

df._dev_cciss_c0d0p1.warning 75
df._dev_mapper_VolGroup00_LogVol00.warning 90
df._dev_mapper_VolGroup00_LogVol01.warning 90
df._dev_mapper_VolGroup00_LogVol02.warning 90
df._dev_mapper_VolGroup00_LogVol04.warning 90
df._dev_mapper_VolGroup01_LogVol00.warning 90
df._dev_mapper_VolGroup02_LogVol00.warning 90
df._dev_mapper_VolGroup03_LogVol00.warning 90

df._dev_cciss_c0d0p1.critical 95
df._dev_mapper_VolGroup00_LogVol00.critical 95
df._dev_mapper_VolGroup00_LogVol01.critical 95
df._dev_mapper_VolGroup00_LogVol02.critical 95
df._dev_mapper_VolGroup00_LogVol04.critical 95
df._dev_mapper_VolGroup01_LogVol00.critical 95
df._dev_mapper_VolGroup02_LogVol00.critical 95
df._dev_mapper_VolGroup03_LogVol00.critical 95

[location1-wms2.otherdomain.tld]
address 169.254.30.88
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
memory.committed.critical 17179869184

df._dev_cciss_c0d0p1.warning 75
df._dev_mapper_VolGroup00_LogVol00.warning 90
df._dev_mapper_VolGroup00_LogVol01.warning 90
df._dev_mapper_VolGroup00_LogVol02.warning 90
df._dev_mapper_VolGroup00_LogVol04.warning 90
df._dev_mapper_VolGroup01_LogVol00.warning 90
df._dev_mapper_VolGroup02_LogVol00.warning 90
df._dev_mapper_VolGroup03_LogVol00.warning 90

df._dev_cciss_c0d0p1.critical 95
df._dev_mapper_VolGroup00_LogVol00.critical 95
df._dev_mapper_VolGroup00_LogVol01.critical 95
df._dev_mapper_VolGroup00_LogVol02.critical 95
df._dev_mapper_VolGroup00_LogVol04.critical 95
df._dev_mapper_VolGroup01_LogVol00.critical 95
df._dev_mapper_VolGroup02_LogVol00.critical 95
df._dev_mapper_VolGroup03_LogVol00.critical 95

[location1-ts1.otherdomain.tld]
address 169.254.30.90
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location1m-fc1.otherdomain.tld]
address 169.254.30.94
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location1-mfc2.otherdomain.tld]
address 169.254.30.96
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location1-ts2.otherdomain.tld]
address 169.254.30.92
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used
memory.apps.label usage
memory.unused.label pagefile

[location2-wms1.otherdomain.tld]
address 169.254.20.20
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
memory.committed.critical 17179869184

df._dev_cciss_c0d0p1.warning 75
df._dev_mapper_VolGroup00_LogVol00.warning 90
df._dev_mapper_VolGroup00_LogVol01.warning 90
df._dev_mapper_VolGroup00_LogVol02.warning 90
df._dev_mapper_VolGroup00_LogVol04.warning 90
df._dev_mapper_VolGroup01_LogVol00.warning 90
df._dev_mapper_VolGroup02_LogVol00.warning 90
df._dev_mapper_VolGroup03_LogVol00.warning 90

df._dev_cciss_c0d0p1.critical 95
df._dev_mapper_VolGroup00_LogVol00.critical 95
df._dev_mapper_VolGroup00_LogVol01.critical 95
df._dev_mapper_VolGroup00_LogVol02.critical 95
df._dev_mapper_VolGroup00_LogVol04.critical 95
df._dev_mapper_VolGroup01_LogVol00.critical 95
df._dev_mapper_VolGroup02_LogVol00.critical 95
df._dev_mapper_VolGroup03_LogVol00.critical 95

[location2-wms2.otherdomain.tld]
address 169.254.20.22
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
memory.committed.critical 17179869184

df._dev_cciss_c0d0p1.warning 75
df._dev_mapper_VolGroup00_LogVol00.warning 90
df._dev_mapper_VolGroup00_LogVol01.warning 90
df._dev_mapper_VolGroup00_LogVol02.warning 90
df._dev_mapper_VolGroup00_LogVol04.warning 90
df._dev_mapper_VolGroup01_LogVol00.warning 90
df._dev_mapper_VolGroup02_LogVol00.warning 90
df._dev_mapper_VolGroup03_LogVol00.warning 90

df._dev_cciss_c0d0p1.critical 95
df._dev_mapper_VolGroup00_LogVol00.critical 95
df._dev_mapper_VolGroup00_LogVol01.critical 95
df._dev_mapper_VolGroup00_LogVol02.critical 95
df._dev_mapper_VolGroup00_LogVol04.critical 95
df._dev_mapper_VolGroup01_LogVol00.critical 95
df._dev_mapper_VolGroup02_LogVol00.critical 95
df._dev_mapper_VolGroup03_LogVol00.critical 95

[location2-ts1.otherdomain.tld]
address 169.254.20.24
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location2-ts2.otherdomain.tld]
address 169.254.20.26
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location2-mfc1.otherdomain.tld]
address 169.254.20.28
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location2-mfc2.otherdomain.tld]
address 169.254.20.30
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[otherdomain.tld;Totals]
update no

load1.graph_title Loads-WMS1
load1.graph_order location1wms1=location1wms1.otherdomain.tld:load.load location2-wms1=location2-wms1.otherdomain.tld:load.load

load2.graph_title Loads-WMS2
load2.graph_order location1wms2=location1wms2.otherdomain.tld:load.load location2-wms2=location2-wms2.otherdomain.tld:load.load

load3.graph_title Loads on top of each other
load3.dummy_field.stack location1wms1=location1wms1.otherdomain.tld:load.load location2-wms1=location2-wms1.otherdomain.tld:load.load location1wms2=location1wms2.otherdomain.tld:load.load location2-wms2=location2-wms2.otherdomain.tld:load.load
load3.dummy_field.draw AREA # We want area instead the default LINE2.
load3.dummy_field.label dummy # This is needed. Silly, really.

memory1.graph_title Memory SWAP WMS
memory1.graph_order location1wms1=location1wms1.otherdomain.tld:memory.swap location2-wms1=location2-wms1.otherdomain.tld:memory.swap location1wms2=location1wms2.otherdomain.tld:memory.swap location2-wms2=location2-wms2.otherdomain.tld:memory.swap

memory2.graph_title Memory Committed WMS
memory2.graph_order location1wms1=location1wms1.otherdomain.tld:memory.committed location2-wms1=location2-wms1.otherdomain.tld:memory.committed location1wms2=location1wms2.otherdomain.tld:memory.committed location2-wms2=location2-wms2.otherdomain.tld:memory.committed

# load3.graph_title Loads summarised
# load3.combined_loads.sum location1wms1.otherdomain.tld:load.load location2-wms1.otherdomain.tld:load.load
# load3.combined_loads.label Combined loads # Must be set, as this is
# # not a dummy field!

[ip-wms1.domain.tld]
address 127.0.0.1
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
memory.committed.critical 17179869184

[ip-wms2.domain.tld]
address 192.168.101.51
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
memory.committed.critical 17179869184

[windows-pc.domain.tld]
address 192.168.101.26
use_node_name yes
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

/etc/munin-node.conf

#
# Example config-file for munin-node
#

log_level 4
log_file /var/log/munin/munin-node.log
port 4949
pid_file /var/run/munin/munin-node.pid
background 1
setseid 1

# Which port to bind to;
host *
user root
group root
setsid yes

# Regexps for files to ignore

ignore_file ~$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$

# Set this if the client doesn’t report the correct hostname when
# telnetting to localhost, port 4949
#
host_name location1-wms1.otherdomain.tld

# A list of addresses that are allowed to connect. This must be a
# regular expression, due to brain damage in Net::Server, which
# doesn’t understand CIDR-style network notation. You may repeat
# the allow line as many times as you’d like

#allow ^127\.0\.0\.1$
allow ^169\.254\.25\.10$

Happy learning !

Categories
blog linux server virtualization

Installed ESXi 4 (with FTP & SSH enabled) & migrated VM’s from workstation

UDATE: This is an outdated article, since ESXi 4.1 you can enable SSH (remote & local) from the VI client through “security features” in “configuration”.

After my XenServer5.5 experience i decided to use VMWare ESXi, let’s be honest, the leader in the market.
First problem, installation would fail because no supported NIC was found. I tried several NIC’s such as 3Com 3C509 & Realtek RTL8139 but no luck.
I ordered an Intel PRO/1000 Desktop PCI adapter. I tested with the ESXi 4 CD and it was detected and supported.
Success, then I made a custom ESXi 4 CD with FTP & SSH enabled (trough custom oem.tgz) and installed ESXi. All went flawless.
Since it took some time for me to test the different NIC’s and finally order the Intel NIC. I had already installed VMWare Workstation evaluation on my desktop and had recreated my VM’s. Of course my PC was not 24/24 online so the website I’m writing this on was only at some times available.

After ESXi was installed and running, I used the VMWare Converter Standalone to convert my workstation VM’s to ESXi. The Windows VM went excellent.
The Ubuntu VM was installed through VMWare Workstation easy install mode, and on the ESXi it would boot fine but would not load the correct drivers for the NIC.
I was trying different things on it, but without NIC there wasn’t much i could do. I tried compiling the VMware tools and drivers but had failures.
I finally had to make a new VM with Ubuntu server fresh install and copied the files and exported the SQL database (on my VMWare workstation i could still boot the VM with network access). But after at least 6 hours of work ESXi was running with the 2 VM’s and the website was operational.

Since i use Windows 7 I had to follow a how-to because Vsphere Client fails on Windows 7 (have to copy system.dll and make a batch script). After updates from VMWare the latest Vsphere Client works fine on Windows 7.
Yesterday and today I finished up the Windows VM and moved PC’s in to the domain, copied back files & setup shares.

Now on to some last items, torrentflux-b4rt, truecrypt, moblock, RAS, …