仮想マシンを構築後、しばらくしてからhttp://192.168.55.108/munin/にアクセスします。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/centos-7.4"
config.vm.hostname = "co74munin"
config.vm.provider :virtualbox do |vbox|
vbox.name = "co74munin"
vbox.cpus = 2
vbox.memory = 1024
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
config.vm.network "private_network", ip: "192.168.55.108", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.108", :netmask => "255.255.255.0"
config.vm.provision "shell", inline: <<-SHELL
# install munin
yum -y install epel-release
yum -y install munin munin-node httpd
htpasswd -b -c /etc/munin/munin-htpasswd admin admin
sed -i -e 's/#dbdir/dbdir/' /etc/munin/munin.conf
sed -i -e 's/#htmldir/htmldir/' /etc/munin/munin.conf
sed -i -e 's/#logdir/logdir/' /etc/munin/munin.conf
sed -i -e 's/#rundir/rundir/' /etc/munin/munin.conf
systemctl enable munin-node
systemctl start munin-node
systemctl enable httpd
systemctl restart httpd
echo 'access http://192.168.55.108/munin/';
echo 'user:admin password:admin'
echo 'cronが動作するまで403 Forbiddenが表示されます'
SHELL
end
muninのスクリーンショット
0 件のコメント:
コメントを投稿