forked from kura/solr-munin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·62 lines (60 loc) · 2.07 KB
/
install.sh
1
2
3
4
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
echo "download plugins"
wget https://raw.github.com/rodricels/solr-munin/master/plugins/solr_docs
wget https://raw.github.com/rodricels/solr-munin/master/plugins/solr_documentcache
wget https://raw.github.com/rodricels/solr-munin/master/plugins/solr_filtercache
wget https://raw.github.com/rodricels/solr-munin/master/plugins/solr_qps
wget https://raw.github.com/rodricels/solr-munin/master/plugins/solr_querycache
wget https://raw.github.com/rodricels/solr-munin/master/plugins/solr_querytime
wget https://raw.github.com/rodricels/solr-munin/master/plugins/solr_updates
echo "install lxml"
apt-get --assume-yes --quiet install python-lxml
echo "done"
echo "chmod"
chmod +x solr_*
echo "done"
echo "chown"
chown root:root solr_*
echo "done"
echo "move"
mv solr_* /usr/share/munin/plugins/
echo "done"
echo "symlink"
ln -s /usr/share/munin/plugins/solr_docs /etc/munin/plugins/solr_docs
ln -s /usr/share/munin/plugins/solr_documentcache /etc/munin/plugins/solr_documentcache
ln -s /usr/share/munin/plugins/solr_filtercache /etc/munin/plugins/solr_filtercache
ln -s /usr/share/munin/plugins/solr_qps /etc/munin/plugins/solr_qps
ln -s /usr/share/munin/plugins/solr_querycache /etc/munin/plugins/solr_querycache
ln -s /usr/share/munin/plugins/solr_querytime /etc/munin/plugins/solr_querytime
ln -s /usr/share/munin/plugins/solr_updates /etc/munin/plugins/solr_updates
echo "done"
echo "restart munin-node"
/etc/init.d/munin-node restart
echo "done"
echo "/etc/munin/plugins/solr_docs"
/etc/munin/plugins/solr_docs
echo
echo "/etc/munin/plugins/solr_documentcache"
/etc/munin/plugins/solr_documentcache
echo
echo "/etc/munin/plugins/solr_filtercache"
/etc/munin/plugins/solr_filtercache
echo
echo "/etc/munin/plugins/solr_qps"
/etc/munin/plugins/solr_qps
echo
echo "/etc/munin/plugins/solr_querycache"
/etc/munin/plugins/solr_querycache
echo
echo "/etc/munin/plugins/solr_querytime"
/etc/munin/plugins/solr_querytime
echo
echo "/etc/munin/plugins/solr_updates"
/etc/munin/plugins/solr_updates
echo
echo "it works!"
exit 0