Newer
Older
# This script should be run after Nginx, MySQL and Wowza setup (if they should be installed)
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# munin
DEBIAN_FRONTEND=noninteractive apt-get install -y ubicast-config
# modify df function https://redmine.ubicast.net/issues/17912
sed -i "s@-P -l @-P@" /usr/share/munin/plugins/df
# configure alerts
# detect where to insert
#LIG=$(grep -n contact.nagios.command /etc/munin/munin.conf | awk -F ":" '{print$1}')
#LIG=$(( $LIG + 1 ))
#head -n ${LIG} /etc/munin/munin.conf > /etc/munin/munin.conf.tmp
#cat << EOF >> /etc/munin/munin.conf.tmp
#contacts alert
#contact.alert.command mail -a "From:sysadmin <sysadmin@ubicast.eu>" -s "[munin] Alert on ${var:host}" sysadmin@ubicast.eu
#contact.alert.always_send warning critical
#[${MS_SERVER_NAME}]
# address 127.0.0.1
# use_node_name yes
# memory.free.warning 512000000:
#EOF
#mv /etc/munin/munin.conf.tmp /etc/munin/munin.conf
# new skin templates
#cd /etc/munin
#git clone https://git.ubicast.net/mediaserver/munin-monitoring-theme.git
#mv /etc/munin/static /etc/munin/static.orig
#mv /etc/munin/templates /etc/munin/templates.orig
#cp -pr munin-monitoring-theme/templates/munstrap/static /etc/munin/
#cp -pr munin-monitoring-theme/templates/munstrap/templates /etc/munin/
# service restart
service munin restart || true
service munin-node restart