dns-oarc / dsp Goto Github PK
View Code? Open in Web Editor NEWDNS Statistics Presenter
Home Page: https://www.dns-oarc.net/oarc/data/dsc
License: Other
DNS Statistics Presenter
Home Page: https://www.dns-oarc.net/oarc/data/dsc
License: Other
Hi
Could someone give any detail regarding the installation of muliple collector node and a central node which present the data from the collector. I look in to several notes but i could not figure out how to install the dsp to recieve the data from the collector and present it. Really appreciate any kind feedback on this.
Thaks in advance.
Maile
Have not been updated since Feb 2015.
If I pass --enable-create-dirs to the configure script, then the resulting Makefile tries to create:
/var/log/dsp
/var/lib/dsc
/var/cache/dsp
It doesn't prepend them with DESTDIR, so if I'm building an RPM package in a chroot, then it fails, because non-root users can't create these directories.
DSC's presenter portion doesn't display ISO Country Codes for IPv6 subnets that are clients of the DNS server being monitored. Instead, there's a double ?? displayed. This seems to be related to the use of the IP::Country module which is an old PERL module that only supports IPv4 whois lookups.
There's another implementation in CPAN similar to IP::Country, but requires upkeep of a database. Alternatively, the portion doing the CC code lookup code be replaced by something else entirely to get the appropriate info.
Based on the Debian package patches Geo::IP could be used as a fallback if IP::Country does not exist.
--- a/presenter/perllib/DSC/grapher/plot.pm
+++ b/presenter/perllib/DSC/grapher/plot.pm
@@ -249,14 +249,12 @@
names => [ qw(Unknown IANA LACNIC APNIC RIPE ARIN) ],
colors => [ qw(black red purple yellow blue brightgreen) ],
label_func => sub {
- use IP::Country;
- my $l = new IP::Country::Fast;
- $l->inet_atocc(shift) || '??';
+ use Geo::IP;
+ my $l = Geo::IP->new(GEOIP_MEMORY_CACHE|GEOIP_CHECK_CACHE);
+ $l->country_code_by_addr(shift) || '??';
},
color_func => sub {
- use IP::Authority;
- my $l = new IP::Authority;
- $l->inet_atoauth(shift) || '??';
+ "??";
},
data_reader => \&DSC::extractor::read_data2,
data_summer => \&DSC::grapher::data_summer_0d,
Change all paths into .in
and let make
generate them with defaults that conform to FHS and as closely as possible matches the old paths if installed into /usr/local
.
Patches are from the Debian source package dsc-statistics
for an old version, may not cover all places:
--- a/presenter/cron/refile-and-grok.sh
+++ b/presenter/cron/refile-and-grok.sh
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-cd /usr/local/dsc/data
+cd /var/lib/dsc-statistics/data
PROG=`basename $0`
exec >$PROG.stdout
@@ -9,7 +9,7 @@
#set -x
date
-EXECDIR=/usr/local/dsc/libexec
+EXECDIR=/usr/share/dsc-statistics-presenter
export EXECDIR SERVER NODE
for SERVER in * ; do
--- a/presenter/perllib/DSC/grapher.pm
+++ b/presenter/perllib/DSC/grapher.pm
@@ -27,8 +27,8 @@
# CONSTANTS
my $dbg_lvl = 0; # also set debug_file in dsc-grapher.cfg
-my $DATAROOT = '/usr/local/dsc/data';
-my $DEFAULTCONFIG = '/usr/local/dsc/etc/dsc-grapher.cfg';
+my $DATAROOT = '/var/lib/dsc-statistics/data';
+my $DEFAULTCONFIG = '/etc/dsc-statistics/dsc-grapher.cfg';
my $CacheImageTTL = 60; # 1 min
my $expires_time = '+1m';
my $sublist_item ='› ';
@@ -180,7 +180,7 @@
$self->make_image($cache_name);
}
}
- my $source = "/usr/local/dsc/share/html/plot.page";
+ my $source = "/usr/share/dsc-statistics-presenter/html/plot.page";
my $t = Text::Template->new(
TYPE => 'FILE',
SOURCE => $source,
@@ -1005,13 +1005,13 @@
sub cache_image_path {
my $self = shift;
my $prefix = shift || die;
- "/usr/local/dsc/cache/$prefix.png";
+ "/var/cache/dsc-statistics-presenter/$prefix.png";
}
sub cache_mapfile_path {
my $self = shift;
my $prefix = shift || confess "cache_mapfile_path: no prefix given";
- "/usr/local/dsc/cache/$prefix.map";
+ "/var/cache/dsc-statistics-presenter/$prefix.map";
}
# return 0 if we should generate a cached image
@@ -1587,11 +1587,11 @@
my $self = shift;
my $icon = shift; # should be like 'foo.png"
my $buf;
- if (open(F, "/usr/local/dsc/share/html/$icon")) {
+ if (open(F, "/usr/share/dsc-statistics-presenter/html/$icon")) {
$buf .= $_ while (<F>);
close(F);
} else {
- warn "/usr/local/dsc/htdocs/$icon: $!\n";
+ warn "/usr/share/dsc-statistics-presenter/html/$icon: $!\n";
}
$buf;
}
--- a/collector/cron/upload-prep.pl
+++ b/collector/cron/upload-prep.pl
@@ -20,8 +20,8 @@
sleep 3;
-foreach my $conf (</usr/local/dsc/etc/*.conf>) {
+foreach my $conf (</var/run/dsc-statistics-collector/*.cfg>) {
next unless open (CONF, $conf);
my $rundir = undef;
while (<CONF>) {
The remove-xmls.pl
can be replaced by a one-line find
and should also be directed to the directory of processed XML files so it does not remove anything that is not processed if the processing have stopped.
Hi!
Am have tried to setup DSP in multi node using the following guide https://github.com/DNS-OARC/dsp/wiki/Multi-Node-Setup-Guide
The issue is that i get the graphs when I deploy the both the DSC and the DSP on Ubuntu Server 18.04. But when I deploy the DSC on CentOS 7 and the DSp on Debian 10.
I have used the upload-prep.pl and upload-rsync.sh to send the XML files from the DSC to the DSP but nothing. I just got the "Nothing to show at this time"
I've already make sure that time and date are in sync on all of my severs and there is no firewall working.
Could somebody help please?
Thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.