Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VLAN graphs shows same data for all infrastructures (as they use the same VID) #509

Closed
rasssta opened this issue Feb 9, 2019 · 4 comments
Assignees

Comments

@rasssta
Copy link

rasssta commented Feb 9, 2019

ISSUE TYPE

Bug Report

OS

Debian

VERSION
define( 'APPLICATION_VERSION', '4.9.2' );
define( 'APPLICATION_VERDATE', '201901210000' );
ENVIRONMENT
$ php -v
PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.10-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies

$ dpkg -l | grep php
rc  libapache2-mod-php7.0                 7.0.32-0ubuntu0.16.04.1                    amd64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  libapache2-mod-php7.2                 7.2.10-0ubuntu0.18.04.1                    amd64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  php-common                            1:60ubuntu1                                all          Common files for PHP packages
ii  php-gettext                           1.0.12-0.1                                 all          transitional dummy package for php-php-gettext
ii  php-igbinary                          2.0.5-1build1                              amd64        igbinary PHP serializer
ii  php-memcache                          3.0.9~20160311.4991c2f-5build2             amd64        memcache extension module for PHP
ii  php-memcached                         3.0.1+2.2.0-1build2                        amd64        memcached extension module for PHP, uses libmemcached
ii  php-msgpack                           2.0.2+0.5.7-2build1                        amd64        PHP extension for interfacing with MessagePack
ii  php-mysql                             1:7.2+60ubuntu1                            all          MySQL module for PHP [default]
ii  php-pear                              1:1.10.5+submodules+notgz-1ubuntu1.18.04.1 all          PEAR Base System
ii  php-php-gettext                       1.0.12-0.1                                 all          read gettext MO files directly, without requiring anything other than PHP
ii  php-rrd                               2.0.1+1.1.3-4build1                        amd64        PHP bindings to rrd tool system
ii  php-zip                               1:7.2+60ubuntu1                            all          Zip module for PHP [default]
rc  php7.0-bcmath                         7.0.32-0ubuntu0.16.04.1                    amd64        Bcmath module for PHP
ii  php7.0-common                         7.0.32-0ubuntu0.16.04.1                    amd64        documentation, examples and common module for PHP
rc  php7.0-curl                           7.0.32-0ubuntu0.16.04.1                    amd64        CURL module for PHP
rc  php7.0-intl                           7.0.32-0ubuntu0.16.04.1                    amd64        Internationalisation module for PHP
rc  php7.0-json                           7.0.32-0ubuntu0.16.04.1                    amd64        JSON module for PHP
ii  php7.0-mbstring                       7.0.32-0ubuntu0.16.04.1                    amd64        MBSTRING module for PHP
rc  php7.0-mcrypt                         7.0.32-0ubuntu0.16.04.1                    amd64        libmcrypt module for PHP
rc  php7.0-mysql                          7.0.32-0ubuntu0.16.04.1                    amd64        MySQL module for PHP
rc  php7.0-opcache                        7.0.32-0ubuntu0.16.04.1                    amd64        Zend OpCache module for PHP
rc  php7.0-readline                       7.0.32-0ubuntu0.16.04.1                    amd64        readline module for PHP
rc  php7.0-snmp                           7.0.32-0ubuntu0.16.04.1                    amd64        SNMP module for PHP
ii  php7.0-xml                            7.0.32-0ubuntu0.16.04.1                    amd64        DOM, SimpleXML, WDDX, XML, and XSL module for PHP
rc  php7.0-zip                            7.0.32-0ubuntu0.16.04.1                    amd64        Zip module for PHP
ii  php7.2                                7.2.10-0ubuntu0.18.04.1                    all          server-side, HTML-embedded scripting language (metapackage)
ii  php7.2-bcmath                         7.2.10-0ubuntu0.18.04.1                    amd64        Bcmath module for PHP
ii  php7.2-cli                            7.2.10-0ubuntu0.18.04.1                    amd64        command-line interpreter for the PHP scripting language
ii  php7.2-common                         7.2.10-0ubuntu0.18.04.1                    amd64        documentation, examples and common module for PHP
ii  php7.2-curl                           7.2.10-0ubuntu0.18.04.1                    amd64        CURL module for PHP
ii  php7.2-gd                             7.2.10-0ubuntu0.18.04.1                    amd64        GD module for PHP
ii  php7.2-intl                           7.2.10-0ubuntu0.18.04.1                    amd64        Internationalisation module for PHP
ii  php7.2-json                           7.2.10-0ubuntu0.18.04.1                    amd64        JSON module for PHP
ii  php7.2-mbstring                       7.2.10-0ubuntu0.18.04.1                    amd64        MBSTRING module for PHP
ii  php7.2-mysql                          7.2.10-0ubuntu0.18.04.1                    amd64        MySQL module for PHP
ii  php7.2-opcache                        7.2.10-0ubuntu0.18.04.1                    amd64        Zend OpCache module for PHP
ii  php7.2-phpdbg                         7.2.10-0ubuntu0.18.04.1                    amd64        server-side, HTML-embedded scripting language (PHPDBG binary)
ii  php7.2-readline                       7.2.10-0ubuntu0.18.04.1                    amd64        readline module for PHP
ii  php7.2-snmp                           7.2.10-0ubuntu0.18.04.1                    amd64        SNMP module for PHP
ii  php7.2-xml                            7.2.10-0ubuntu0.18.04.1                    amd64        DOM, SimpleXML, WDDX, XML, and XSL module for PHP
ii  php7.2-zip                            7.2.10-0ubuntu0.18.04.1                    amd64        Zip module for PHP

CONFIGURATION
GRAPHER_BACKENDS="mrtg|sflow"
GRAPHER_BACKEND_MRTG_DBTYPE="log"
GRAPHER_BACKEND_MRTG_LOGDIR="/opt/mrtg"
GRAPHER_BACKEND_MRTG_WORKDIR="/opt/mrtg"
GRAPHER_BACKEND_SFLOW_ENABLED=true
GRAPHER_BACKEND_SFLOW_ROOT="http://<IP>/grapher-sflow"
GRAPHER_CACHE_ENABLED=false
GRAPHER_ACCESS_TRUNK=3

SUMMARY

We have 3 infrastructures, all of them using VID 203 for the peering VLAN. When looking at VLAN graphs in IXP Manager, all of the 3 infras show the same traffic and when I look at the log it's quite clear why it does that :-)

- - [09/Feb/2019:15:44:07 +0100] "GET /grapher-sflow/ipv6/bytes/aggregate/aggregate.ipv6.bytes.vlan00203.rrd HTTP/1.0" 200 185540 "-" "-"

I'm running sflow collection on a separate server which hasn't received IXP Manager updates in a (long) while and I guess that's why I have run into this problem, or is it a bug? Do you happen to know what files that should be updated to support this new (excellent!) feature?

STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
IMPORTANCE
@rasssta rasssta changed the title VLAN graphs shows same graphs for all infrastructures (as they use the same VID) VLAN graphs shows same data for all infrastructures (as they use the same VID) Feb 9, 2019
@barryo
Copy link
Member

barryo commented Feb 10, 2019

We have 3 infrastructures, all of them using VID 203 for the peering VLAN

Right... we also have three infrastructures but they all use a different VLAN so we haven't bumped up against this.

Looking at the sflow-to-rrd-handler, the vlan is taken directly from the sflow sample.

The fix for this is fairly easy for the graph displaying side:

The problem is sflow-to-rrd-handler - it would not need to turn an sflow sample with vlan tag into an infrastructure and VLAN DB ID. This probably means it needs to know the source switch by sflow sample source IP to identify the infrastructure and then have a infrastructure/vlan tag to valn DB ID table to get the vlan DB ID. That's adding a lot of complexity to this script which is Perl so falls into @nickhilliard 's domain of expertise.

Even is we can't move on this quickly @rasssta, it looks like this only affects the vlan graphs (not individual or p2p) via sflow. You can move on this yourself is two ways:

  1. limit access to admins only via access permissions
  2. hack the sflow-to-rrd-handler script to solve your immediate issue and update the one line in the sflow backend file above.

@rasssta
Copy link
Author

rasssta commented Feb 10, 2019

Thanks for the update!

@nickhilliard
Copy link
Member

co-incidentally, I noticed this problem yesterday while looking at something else.

It's not that difficult to handle in sflow-to-rrd-handler because the code already works out the vliid of the frame, and you can just pull the vlan id from that. It will mean renaming the graphs though, and that's a nuisance.

@barryo
Copy link
Member

barryo commented Sep 18, 2021

## Housekeeping Sept 2021

@barryo closing long running issues (open multiple years).

Where appropriate, will:

  • relocate to the IDEAS file.
  • Add additional information below.
  • No relocation / additional information for uber-stale issues.

Additional information: renaming the graphs is a big job and would affect all users. I think the best for now is to reassess this as part of a wider development effort on p2p graphing (i.e. use of time-series databases) and have anyone affected address as above and/or use different tags on different infrastructures.

@barryo barryo closed this as completed Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants