Outils pour utilisateurs

Outils du site


tech:install_munin_sur_redhat_centos

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
tech:install_munin_sur_redhat_centos [2025/03/24 15:06] – créée - modification externe 127.0.0.1tech:install_munin_sur_redhat_centos [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Brouillon}}
 +
 +# Install de Munin sur RedHat /CentOS
 +
 +Source : http://tecadmin.net/installing-munin-in-centos-rhel-and-fedora/
 +
 +Install
 +~~~bash
 +yum install epel-release
 +yum --enablerepo=epel install munin munin-node rrdtool
 +~~~
 +
 +Changement binding sur localhost (inutile d'écouter sur les cartes réseaux, car on communique en localhost)
 +~~~bash
 +sed -i -e 's/^host \*/host 127.0.0.1/' /etc/munin/munin-node.conf
 +~~~ 
 +
 +Création MDP
 +~~~bash
 +htpasswd -cm /etc/munin/munin-htpasswd muninadmin
 +~~~
 +
 +Nous ajoutons dans le fichier /etc/httpd/conf.d/munin.conf la ligne suivante :
 +
 +`/etc/httpd/conf.d/munin.conf`
 +~~~apache
 +Alias /munin /var/www/html/munin
 +~~~
 +
 +Sur ma conf j'ai dû aussi ajouter un `DirectoryIndex index.html`
 +
 +Normalement ça devrait ressembler à :
 +
 +`/etc/httpd/conf.d/munin.conf`
 +~~~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
 +# (/var/www/html/munin) must have "AllowOverride all" or something close
 +# to that set.
 +#
 +# As a config file enclose it in <directory> like so:
 +#
 +<directory /var/www/html/munin>
 +
 +AuthUserFile /etc/munin/munin-htpasswd
 +AuthName "Munin"
 +AuthType Basic
 +require valid-user
 +
 +# This next part requires mod_expires to be enabled.
 +#
 +# We could use <IfModule mod_expires> around here, but I want it to be
 +# 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
 +
 +</directory>
 +ScriptAlias /munin-cgi/munin-cgi-graph /var/www/cgi-bin/munin-cgi-graph
 +<Location /munin-cgi/munin-cgi-graph>
 +  AuthUserFile /etc/munin/munin-htpasswd
 +  AuthName "Munin"
 +  AuthType Basic
 +  require valid-user
 +</Location>
 +
 +# Ajout
 +Alias /munin /var/www/html/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 `/etc/cron.d/munin`
 +
 +
 +## Notes brouillon
 +
 +CentOS6
 +
 +
 +### MySQL
 +
 +~~~bash
 +ln -s /usr/share/munin/plugins/mysql_* /etc/munin/plugins/
 +service munin-node restart
 +~~~
 +
 +`/etc/munin/plugin-conf.d/munin-node`
 +~~~
 +[diskstats]
 +user munin
 +
 +[iostat_ios]
 +user munin
 +
 +[mysql*]
 +user root
 +env.mysqlopts --defaults-extra-file=/var/lib/munin/.my.cnf
 +~~~
 +
 +`/var/lib/munin/.my.cnf`
 +~~~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 /var/lib/munin/.my.cnf
 +chmod 600 /var/lib/munin/.my.cnf
 +service munin-node restart
 +~~~
 +
 +
 +### Apache
 +
 +`/etc/httpd/conf/httpd.conf`
 +~~~apache
 +LoadModule status_module modules/mod_status.so
 +
 +ExtendedStatus On
 +
 +<Location /server-status>
 +    SetHandler server-status
 +    Order deny,allow
 +    Deny from all
 +    Allow from 127.0.0.1 ::1
 +</Location>
 +~~~
 +
 +~~~bash
 +service httpd restart
 +~~~
 +
 +~~~bash
 +ln -s /usr/share/munin/plugins/apache_* /etc/munin/plugins/
 +service munin-node restart
 +~~~
 +
 +
 +## Pb MySQL bug : mysql innodb free tablespace
 +
 +Voir :
 +* https://forums.cpanel.net/threads/munin-plugin-warn-mysql-innodb-free-tablespace.208591/
 +
 +Test
 +~~~bash
 +su - munin -s /bin/bash
 +cd /etc/munin/plugins
 +./mysql_innodb
 +~~~
 +
 +Erreur
 +~~~
 +./mysql_innodb: Error: No visible tables use InnoDB
 +free.value U
 +~~~
 +
 +Désactiver la sonde
 +~~~bash
 +unlink /etc/munin/plugins/mysql_innodb
 +service munin-node restart
 +~~~
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki