Thursday 4 December 2014

Installing Munin node client - on Solaris 11

1. Install gnu-tar, gnu-make and make with pkg. 2. Install the following Perl modules: Net::Server, Time::HiRes, and Net:SNMP 3. Create Munin User
root@sol11server:/var/tmp# groupadd -g 500 munin
root@sol11server:/var/tmp# useradd -d /export/home/munin/ -m -g munin -u 500 munin
80 blocks
4. Download the Munin source and make install:
root@sol11server:/var/tmp# wget http://downloads.munin-monitoring.org/munin/stable/2.0.25/munin-2.0.25.tar.gz
--2014-12-04 11:43:04--  http://downloads.munin-monitoring.org/munin/stable/2.0.25/munin-2.0.25.tar.gz
Resolving downloads.munin-monitoring.org (downloads.munin-monitoring.org)... 87.238.48.91, 2a02:c0:1018::fa57
Connecting to downloads.munin-monitoring.org (downloads.munin-monitoring.org)|87.238.48.91|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1337586 (1.3M) [application/x-gzip]
Saving to: `munin-2.0.25.tar.gz'

100%[====================================================================================>] 1,337,586   1002K/s   in 1.3s

2014-12-04 11:43:05 (1002 KB/s) - `munin-2.0.25.tar.gz' saved [1337586/1337586]

root@sol11server:/var/tmp# gtar zxvf munin-2.0.25.tar.gz

root@sol11server:~# cd munin-2.0.25

root@sol11server:~# gmake install-common-prime install-node-prime install-plugins-prime
5. Edit the munin-node.conf, set host_name and allow ip address of Munin server. 6. Install the modules using this script:
#!/bin/sh
for i in `cat /var/tmp/plugins-list`
do
        ln -s /opt/munin/lib/plugins/$i /etc/opt/munin/plugins/$i
done
The plugins-list will be a list of the modules you wish munin-node to run, e.g.:
apache_accesses
apache_processes
apache_volume
df
df_inode
http_loadtime
memcached_
munin_stats
munin_update
netstat
ntp_
ntp_kernel_err
ntp_kernel_pll_freq
ntp_kernel_pll_off
ntp_offset
ntp_states
ping_
processes
ps_
psu_
7. Install startup/shutdown script, and then startup Munin-node.
#!/sbin/sh
#
prog="munin-node"
path="/opt/munin/sbin"

/usr/bin/mkdir -p /var/run/munin

case "$1" in
'restart')
        #stop the daemon, then fall through to the start
        /usr/bin/pkill -x $prog
        $path/$prog
        ;;
'start')
        $path/$prog
        ;;

'stop')
        /usr/bin/pkill -x $prog
        ;;

*)
        echo "Usage: $0 { start | stop | restart }"
        exit 1
        ;;
esac
exit 0