Projet

Général

Profil

Weathermap » Historique » Version 3

Baptiste Jonglez, 08/03/2014 12:51

1 2 Baptiste Jonglez
{{>toc}}
2 2 Baptiste Jonglez
3 1 Baptiste Jonglez
h1. Weathermap
4 1 Baptiste Jonglez
5 1 Baptiste Jonglez
But : création d'une *weathermap* pour le réseau de tetaneutral.net
6 1 Baptiste Jonglez
7 1 Baptiste Jonglez
8 1 Baptiste Jonglez
h2. Exemples de weathermap
9 1 Baptiste Jonglez
10 1 Baptiste Jonglez
* http://weathermap.ielo.net/
11 1 Baptiste Jonglez
* http://www.hivane.net/info/weathermap.html
12 1 Baptiste Jonglez
* https://noc.rezopole.net/weathermap/weathermap.png
13 1 Baptiste Jonglez
* http://pasillo.renater.fr/weathermap/weathermap_metropole.html
14 1 Baptiste Jonglez
* http://pasillo.renater.fr/weathermap/weathermap_idf.html
15 1 Baptiste Jonglez
16 1 Baptiste Jonglez
h2. Logiciel utilisé
17 1 Baptiste Jonglez
18 1 Baptiste Jonglez
http://www.network-weathermap.com/ version 0.97c
19 1 Baptiste Jonglez
20 1 Baptiste Jonglez
On utilise la version en PHP, mais juste en command-line : on l'appelle en lui donnant la configuration, et il génère une image.  Il faudra mettre ça dans un cron, par exemple toutes les 5 minutes.
21 1 Baptiste Jonglez
22 1 Baptiste Jonglez
h3. Documentation
23 1 Baptiste Jonglez
24 1 Baptiste Jonglez
* http://www.network-weathermap.com/manual/latest/pages/config-reference.html
25 1 Baptiste Jonglez
* http://www.network-weathermap.com/manual/latest/pages/targets.html
26 1 Baptiste Jonglez
27 1 Baptiste Jonglez
h3. Dépendences
28 1 Baptiste Jonglez
29 1 Baptiste Jonglez
* php
30 1 Baptiste Jonglez
* lib GD pour PHP
31 1 Baptiste Jonglez
* rrdtool, facultatif (non nécessaire ici, on va taper dans des fichiers texte simple pour les données de débit)
32 1 Baptiste Jonglez
33 1 Baptiste Jonglez
Sous Debian wheezy : @apt-get install php5 php5-gd @
34 1 Baptiste Jonglez
35 1 Baptiste Jonglez
h3. Usage
36 1 Baptiste Jonglez
37 1 Baptiste Jonglez
Penser à avoir l'image de fond dans le dossier courant (@france-contour-1000.jpg@), ainsi que la fonte (@DejaVuSans.ttf@)
38 1 Baptiste Jonglez
39 1 Baptiste Jonglez
<pre>./weathermap --config tetaneutral.conf</pre>
40 1 Baptiste Jonglez
41 1 Baptiste Jonglez
Ne pas se formaliser des warnings, ça doit marcher quand même.  Fichiers générés : @tetaneutral.png@, @tetaneutral.html@.
42 1 Baptiste Jonglez
43 1 Baptiste Jonglez
h2. Configuration pour tetaneutral.net
44 1 Baptiste Jonglez
45 1 Baptiste Jonglez
* Fond de carte : contour de France
46 1 Baptiste Jonglez
* Débit des liens par VLAN
47 1 Baptiste Jonglez
* Pour simplifier, le nom d'un lien est le nom du VLAN (@eth0.XXXX@)
48 1 Baptiste Jonglez
* Capacité des liens telle qu'indiquée sur http://as197422.net/ (uniquement pour les IX)
49 1 Baptiste Jonglez
50 1 Baptiste Jonglez
Format attendu du fichier de données : *tab-separated* @nom_lien<TAB>débit_in<TAB>débit_out@. Les débits sont exprimés en bit/s.  Exemple de fichier pour @gw@ :
51 1 Baptiste Jonglez
52 1 Baptiste Jonglez
<pre>
53 1 Baptiste Jonglez
eth0.125	2727600	4803009
54 1 Baptiste Jonglez
eth0.3009	504761	7232794
55 1 Baptiste Jonglez
eth0.3011	54	58
56 1 Baptiste Jonglez
eth0.131	215	866
57 1 Baptiste Jonglez
eth0.124	961143	3272324
58 1 Baptiste Jonglez
eth0.132	774038	17283850
59 1 Baptiste Jonglez
eth0.502	3620973	361352
60 1 Baptiste Jonglez
eth0.126	98816	664712
61 1 Baptiste Jonglez
eth0.127	73371	1968594
62 1 Baptiste Jonglez
</pre>
63 1 Baptiste Jonglez
64 1 Baptiste Jonglez
La configuration actuelle s'attend à trouver les données pour @gw@ dans @data-gw.txt@ et celles pour @h3@ dans @data-h3.txt@.  C'est possible de modifier pour tout prendre dans le même fichier (TARGET).
65 1 Baptiste Jonglez
66 1 Baptiste Jonglez
h2. Preview
67 1 Baptiste Jonglez
68 1 Baptiste Jonglez
Avec des données de décembre 2013 :
69 1 Baptiste Jonglez
70 1 Baptiste Jonglez
!tetaneutral.png!
71 1 Baptiste Jonglez
72 1 Baptiste Jonglez
h2. TODO
73 1 Baptiste Jonglez
74 1 Baptiste Jonglez
* il manque la capacité des transits et peerings (Liazo, Absolight, Gitoyen, Gixe, Fullsave, Jaguar)
75 1 Baptiste Jonglez
* il manque la donnée de débit sur le lien entre @h3@ et @gw@
76 1 Baptiste Jonglez
* trouver une meilleure couleur pour la plage 0-1%
77 3 Baptiste Jonglez
* mettre en place un cron