OSMC/Raspberry : installation de munin ( et Apache2) avec un script pour Freebox

Le script pour la freebox est ici : https://github.com/guyou/freebox_munin/blob/freeboxv5/freeboxv5 ( le projet est http://github.com/d-matt/freebox_munin ) .

Pour plus d’information sur Munin : https://doc.ubuntu-fr.org/munin ( A noter qu’il faut Apache2 afin de voir l’interface ) .

L’installation :

$ sudo apt-get install munin
$ sudo apt-get install munin-node
$ sudo apt-get install munin-plugins-extra libcgi-fast-perl libapache2-mod-fcgid
$ sudo apt-get install apache2
$ sudo apt-get install libapache2-mod-php5 apache2-doc apache2-utils
$ sudo ln -s /etc/munin/apache24.conf /etc/apache2/conf-available/munin.conf
$ sudo a2enmod fcgid
Enabling module fcgid.
To activate the new configuration, you need to run:
  service apache2 restart

$ sudo systemctl restart apache2
$ sudo su
-> Copie du script dans /usr/share/munin/plugins/freeboxv5
# ln -s /usr/share/munin/plugins/freeboxv5 /etc/munin/plugins/freeboxv5_atm
# ln -s /usr/share/munin/plugins/freeboxv5 /etc/munin/plugins/freeboxv5_attenuation
# ln -s /usr/share/munin/plugins/freeboxv5 /etc/munin/plugins/freeboxv5_snr
# ln -s /usr/share/munin/plugins/freeboxv5 /etc/munin/plugins/freeboxv5_status
# ln -s /usr/share/munin/plugins/freeboxv5 /etc/munin/plugins/freeboxv5_uptime
# ln -s /usr/share/munin/plugins/freeboxv5 /etc/munin/plugins/freeboxv5_fec
# ln -s /usr/share/munin/plugins/freeboxv5 /etc/munin/plugins/freeboxv5_hec
# ln -s /usr/share/munin/plugins/freeboxv5 /etc/munin/plugins/freeboxv5_crc
# ln -s /usr/share/munin/plugins/freeboxv5 /etc/munin/plugins/freeboxv5_rates

Modification du fichier /etc/munin/plugin-conf.d/munin-node :

[freebox_*]                                                   
user nobody      

Restart :

# sudo service munin-node restart

A noter que l’on n’est pas obligé de faire le lien symbolique, on peut ajouter dans /etc/apache2/apache2.conf :

Alias /munin /var/cache/munin/www 
<Directory /var/cache/munin/www> 
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted                                                  
</Directory>   

Ensuite il suffit de faire dans un navigateur :

http://192.168.0.28/munin/

Avec 192.168.0.28 l’IP de votre OSMC/Raspberry :

On peut ajouter un couche de sécurité via htaccess …

Attention il faut aussi installer bc :

$ sudo apt-get install bc

Sinon on a une erreur :

2018/09/21-19:10:12 [5846] Error output from freeboxv5_uptime:
2018/09/21-19:10:12 [5846]      /etc/munin/plugins/freeboxv5_uptime: line 143: bc: command not found    

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Time limit is exhausted. Please reload CAPTCHA.