===== Munin ====
Jak nainstalovat a rozběhat dohled nad serverem, vybral jsem si variantu Munin s nginxem.
==== Instalace ====
Nainstalujeme muninapt-get install muninzeditujeme konfigurační soubor /etc/munin/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, logs and the lock/pid files. They all
# must be writable by the user running munin-cron. They are all
# defaulted to the values you see here.
#
dbdir /var/lib/munin
htmldir /www/default/munin
logdir /var/log/munin
rundir /var/run/munin
# Where to look for the HTML templates
#
tmpldir /etc/munin/templates
# Where to look for the static www files
#
#staticdir /etc/munin/static
# temporary cgi files are here. note that it has to be writable by
# the cgi user (usually nobody or httpd).
#
# cgitmpdir /var/lib/munin/cgi-tmp
# (Exactly one) directory to include all files from.
includedir /etc/munin/munin-conf.d
[...]
# a simple host tree
[server1.example.com]
address 127.0.0.1
use_node_name yes
[...]vytvoříme si adresář, kde se budou statistiky vytvářetmkdir /www/default/munin
chmod 755 /www/default/munin
chown munin:munin /www/default/muninnastavíme si nginx, abysme si statistiky mohli zobrazit, tento kus kódu si přídáme do configu, kde se reší přístup do default složky# access munin
location /munin {
auth_basic "Administrator Login";
auth_basic_user_file /var/www/.htpasswd;
}jelikož jsme si nad statistikama vytvořili heslovaný přístup, ještě si vytoříme soubor .htpasswdvim /www/.htpasswda přidáme do něj řádek uživatel:heslo v htpasswd formátu, dále už nám zbývá jen restartovat nginx a munin/etc/init.d/nginx restart
/etc/init.d/munin-node restart