From 05bf2c8be209e619f8c9e727fd1353198b042642 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 9 Sep 2015 14:41:38 +0200 Subject: begin packaging of tinc_stats --- retiolum/scripts/adv_graphgen/README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 retiolum/scripts/adv_graphgen/README.md (limited to 'retiolum/scripts/adv_graphgen/README.md') diff --git a/retiolum/scripts/adv_graphgen/README.md b/retiolum/scripts/adv_graphgen/README.md new file mode 100644 index 00000000..082e0f2b --- /dev/null +++ b/retiolum/scripts/adv_graphgen/README.md @@ -0,0 +1,28 @@ +The folder contains a number of scripts which provide a convenient way to +generate advanced graphs from the SIGUSR2 output of tinc. + +it currently contains the following files: + +sanitize.sh: + wrapper arond parse.py which filters the syslog file for all tinc + related lines and removes the status informations: + this means that + + May 19 20:40:44 servarch dnsmasq[5382]: reading /etc/resolv.conf + May 19 20:41:38 servarch tinc.retiolum[4780]: Error looking up pa-sharepoint.informatik.ba-stuttgart.de port 655: Name or service not known + + becomes + + Error looking up pa-sharepoint.informatik.ba-stuttgart.de port 655: Name or service not known + + and so on. + It also provides a wrapper around graphviz which automagically + generates graphs from the produced graph file + +parse.py: + reads from stdin the sanitized syslog file and prints a valid dot file + from the given output. + The parser module may also produce any other output (e.g. for dns + entries and so on) you will need to actually read and modify the source + in order to be able to do this. ~May the source be with you~ + -- cgit v1.2.3 From 219fab970c7fe455d3dd9bc48e909d96a234046b Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 10 Sep 2015 15:48:38 +0200 Subject: adv_graphgen: finish packaging --- retiolum/scripts/adv_graphgen/README.md | 66 +++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 28 deletions(-) (limited to 'retiolum/scripts/adv_graphgen/README.md') diff --git a/retiolum/scripts/adv_graphgen/README.md b/retiolum/scripts/adv_graphgen/README.md index 082e0f2b..0f3ee285 100644 --- a/retiolum/scripts/adv_graphgen/README.md +++ b/retiolum/scripts/adv_graphgen/README.md @@ -1,28 +1,38 @@ -The folder contains a number of scripts which provide a convenient way to -generate advanced graphs from the SIGUSR2 output of tinc. - -it currently contains the following files: - -sanitize.sh: - wrapper arond parse.py which filters the syslog file for all tinc - related lines and removes the status informations: - this means that - - May 19 20:40:44 servarch dnsmasq[5382]: reading /etc/resolv.conf - May 19 20:41:38 servarch tinc.retiolum[4780]: Error looking up pa-sharepoint.informatik.ba-stuttgart.de port 655: Name or service not known - - becomes - - Error looking up pa-sharepoint.informatik.ba-stuttgart.de port 655: Name or service not known - - and so on. - It also provides a wrapper around graphviz which automagically - generates graphs from the produced graph file - -parse.py: - reads from stdin the sanitized syslog file and prints a valid dot file - from the given output. - The parser module may also produce any other output (e.g. for dns - entries and so on) you will need to actually read and modify the source - in order to be able to do this. ~May the source be with you~ - +# Generate Graphs from tinc + +## Install +### Nix + + # tinc_pre is required: + nix-env -i -f tinc_graphs.nix + + ## e.g. in Retiolum: + ## krebs.retiolum.tinc = pkgs.tinc_pre +### Local + + python setup.py install + # also install graphviz,imagemagic for building graphs + + +### Usage: + +see source of the 2 builder scripts: + + #all-around-builder + # env: EXTERNAL_FOLDER, INTERNAL_FOLDER, GEODB, TINC_HOSTPATH + all-the-graphs + + # build actual graphs + build-graph + + # exported py scripts + tinc-stats2json # - parses tinc current state into json + tinc-build-graph # - transfers json to graph + copy-map # - copies map.html into $1 + add-geodata # - adds geodata to json + tinc-availability-stats # adds availability data to json + +## Geodb infos + +- http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz +- nix-env -iA geolite-legacy -- cgit v1.2.3