Code Monkey home page Code Monkey logo

dsp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jelu sshyran ximoman

dsp's Issues

DSC and DSP multi node installation

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

Option --enable-create-dirs fails with chroot builds

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.

Presenter graphic doesn't show CC for IPv6 clients

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.

Use Geo::IP as fallback

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,

Conform to FHS

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>) {

Remove remove-xmls.pl and update documentation

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.

Get no graph when deploying DSC on CentOS7 and DSp on Debian10

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.