tech:install_munin_sur_redhat_centos
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédente | |||
| tech:install_munin_sur_redhat_centos [2025/11/09 19:16] – Jean-Baptiste | tech:install_munin_sur_redhat_centos [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Install de Munin sur RedHat /CentOS | ||
| + | |||
| + | Source : http:// | ||
| + | |||
| + | Install | ||
| + | ~~~bash | ||
| + | yum install epel-release | ||
| + | yum --enablerepo=epel install munin munin-node rrdtool | ||
| + | ~~~ | ||
| + | |||
| + | Changement binding sur localhost (inutile d' | ||
| + | ~~~bash | ||
| + | sed -i -e ' | ||
| + | ~~~ | ||
| + | |||
| + | Création MDP | ||
| + | ~~~bash | ||
| + | htpasswd -cm / | ||
| + | ~~~ | ||
| + | |||
| + | Nous ajoutons dans le fichier / | ||
| + | |||
| + | `/ | ||
| + | ~~~apache | ||
| + | Alias /munin / | ||
| + | ~~~ | ||
| + | |||
| + | Sur ma conf j'ai dû aussi ajouter un `DirectoryIndex index.html` | ||
| + | |||
| + | Normalement ça devrait ressembler à : | ||
| + | |||
| + | `/ | ||
| + | ~~~apache | ||
| + | # This file can be used as a .htaccess file, or a part of your apache | ||
| + | # config file. | ||
| + | # | ||
| + | # For the .htaccess file option to work the munin www directory | ||
| + | # (/ | ||
| + | # to that set. | ||
| + | # | ||
| + | # As a config file enclose it in < | ||
| + | # | ||
| + | < | ||
| + | |||
| + | AuthUserFile / | ||
| + | AuthName " | ||
| + | AuthType Basic | ||
| + | require valid-user | ||
| + | |||
| + | # This next part requires mod_expires to be enabled. | ||
| + | # | ||
| + | # We could use < | ||
| + | # as evident as possible that you either have to load mod_expires _or_ | ||
| + | # you coment out/remove these lines. | ||
| + | |||
| + | # Set the default expiery time for files 5 minutes 10 seconds from | ||
| + | # their creation (modification) time. There are probably new files by | ||
| + | # that time. | ||
| + | |||
| + | ExpiresActive On | ||
| + | ExpiresDefault M310 | ||
| + | # Ajout | ||
| + | DirectoryIndex index.html | ||
| + | |||
| + | </ | ||
| + | ScriptAlias / | ||
| + | < | ||
| + | AuthUserFile / | ||
| + | AuthName " | ||
| + | AuthType Basic | ||
| + | require valid-user | ||
| + | </ | ||
| + | |||
| + | # Ajout | ||
| + | Alias /munin / | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | ~~~bash | ||
| + | systemctl enable munin-node | ||
| + | systemctl start munin-node | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | En vérifie que la conf est ok | ||
| + | ~~~bash | ||
| + | apachectl -t | ||
| + | ~~~ | ||
| + | |||
| + | Si ok | ||
| + | ~~~bash | ||
| + | systemctl reload httpd | ||
| + | ~~~ | ||
| + | |||
| + | NB, les graphes sont générés grâce à la cron `/ | ||
| + | |||
| + | |||
| + | ## Notes brouillon | ||
| + | |||
| + | CentOS6 | ||
| + | |||
| + | |||
| + | ### MySQL | ||
| + | |||
| + | ~~~bash | ||
| + | ln -s / | ||
| + | service munin-node restart | ||
| + | ~~~ | ||
| + | |||
| + | `/ | ||
| + | ~~~ | ||
| + | [diskstats] | ||
| + | user munin | ||
| + | |||
| + | [iostat_ios] | ||
| + | user munin | ||
| + | |||
| + | [mysql*] | ||
| + | user root | ||
| + | env.mysqlopts --defaults-extra-file=/ | ||
| + | ~~~ | ||
| + | |||
| + | `/ | ||
| + | ~~~ini | ||
| + | [mysqldump] | ||
| + | user=root | ||
| + | password=P@ssw0rd | ||
| + | |||
| + | [mysql] | ||
| + | user=root | ||
| + | password=P@ssw0rd | ||
| + | |||
| + | [mysqladmin] | ||
| + | user=root | ||
| + | password=P@ssw0rd | ||
| + | |||
| + | [mysqlshow] | ||
| + | user=root | ||
| + | password=P@ssw0rd | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | chown munin:munin / | ||
| + | chmod 600 / | ||
| + | service munin-node restart | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### Apache | ||
| + | |||
| + | `/ | ||
| + | ~~~apache | ||
| + | LoadModule status_module modules/ | ||
| + | |||
| + | ExtendedStatus On | ||
| + | |||
| + | < | ||
| + | SetHandler server-status | ||
| + | Order deny,allow | ||
| + | Deny from all | ||
| + | Allow from 127.0.0.1 ::1 | ||
| + | </ | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | service httpd restart | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | ln -s / | ||
| + | service munin-node restart | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Pb MySQL bug : mysql innodb free tablespace | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | |||
| + | Test | ||
| + | ~~~bash | ||
| + | su - munin -s /bin/bash | ||
| + | cd / | ||
| + | ./ | ||
| + | ~~~ | ||
| + | |||
| + | Erreur | ||
| + | ~~~ | ||
| + | ./ | ||
| + | free.value U | ||
| + | ~~~ | ||
| + | |||
| + | Désactiver la sonde | ||
| + | ~~~bash | ||
| + | unlink / | ||
| + | service munin-node restart | ||
| + | ~~~ | ||
| + | |||
