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    

Free : La misère du support ADSL … ( Freebox)

Chez Free ADSL le support est catastrophique … depuis plus d’un mois j’ai des problèmes ADSL … ( depuis le 30/07/2018 ) .

Bug quand on essaye de prendre une rendez-vous :

Par contre les factures sont biens envoyés …

En résumé :

Et pour deux fois le prix de chez RED :

Impossible de faire des relances :

Et impossible d’avoir un journal de logs supérieur à 24 lignes, donc 12 reset :

J’ai fait un petit script :

$ cat free.bash 
#!/bin/bash
while :; do
   echo curling...
   wget -q -O - http://mafreebox.freebox.fr/pub/fbx_info.txt >> Brut-info.txt	
   sleep 200
done

Ensuite je fais deux commandes pour avoir le fichier propre :

$ iconv -c -f UTF-8 -t ASCII  Brut-info.txt > Brut-info-clean.txt
$ grep "nnexion  " Brut-info-clean.txt | awk '{print $1 " " $2 " " $3}' | sort -n | uniq | sort > Brut-info-clean-2.txt

Si je fais des statistiques, je trouve que cela ne fonctionne pas 30% du temps … mais en fait c’est beaucoup plus car il y a le temps de propagation des IP sur le réseau … Sans parler que toutes les coupures ne permettent pas d’utiliser des applications.

Ecart
01/08/2018 20:54:25 Connexion 00:00:51
01/08/2018 20:53:34 Déconnexion 00:02:42
01/08/2018 20:50:52 Connexion 00:00:47
01/08/2018 20:50:05 Déconnexion 00:00:36
01/08/2018 20:49:29 Connexion 00:00:47
01/08/2018 20:48:42 Déconnexion 00:00:35
01/08/2018 20:48:07 Connexion 00:00:46
01/08/2018 20:47:21 Déconnexion 00:00:37
01/08/2018 20:46:44 Connexion 00:00:47
01/08/2018 20:45:57 Déconnexion 00:02:34
01/08/2018 20:43:23 Connexion 00:00:46
01/08/2018 20:42:37 Déconnexion 00:00:39
01/08/2018 20:41:58 Connexion 00:00:51
01/08/2018 20:41:07 Déconnexion 00:00:57
01/08/2018 20:40:10 Connexion 00:00:47
01/08/2018 20:39:23 Déconnexion 00:01:36
01/08/2018 20:37:47 Connexion 00:00:47
01/08/2018 20:37:00 Déconnexion 00:00:49
01/08/2018 20:36:11 Connexion 00:01:06
01/08/2018 20:35:05 Déconnexion 00:00:44
01/08/2018 20:34:21 Connexion 00:00:47
01/08/2018 20:33:34 Déconnexion 00:07:46
01/08/2018 20:25:48 Connexion 00:00:47
01/08/2018 20:25:01 Déconnexion
Temps CNX 00:19:35 67%
Temps DCNX 00:09:49 33%
TOTAL 00:29:24

A suivre.

Mise à jours : 28/09/2018 : On peut voir la qualité des outils de Free pour le support :