inex / IXP-Manager

Full stack web application powering peering at over 200 Internet Exchange Points (IXPs) globally.
https://www.ixpmanager.org/
GNU General Public License v2.0
379 stars 164 forks source link

MRTG Escape Characters #384

Closed MHammett closed 6 years ago

MHammett commented 6 years ago
ISSUE TYPE
OS

Description: Ubuntu 16.04.3 LTS

VERSION
root@ixpm:/srv/ixpmanager# cat library/IXP/Version.php | grep APPLICATION
define( 'APPLICATION_VERSION', '4.7.2' );
define( 'APPLICATION_VERDATE', '2018013100' );
ENVIRONMENT
root@ixpm:/srv/ixpmanager# php -v
PHP 7.0.22-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.22-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies
root@ixpm:/srv/ixpmanager# dpkg -l | grep php
ii  libapache2-mod-php7.0          7.0.22-0ubuntu0.16.04.1                    amd64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  php-common                     1:35ubuntu6                                all          Common files for PHP packages
ii  php-dompdf                     0.6.1+dfsg-2ubuntu1                        all          HTML to PDF converter
ii  php-font-lib                   0.2.2+dfsg-2build1                         all          read, parse, export and make subsets of different fonts
ii  php-gd                         1:7.0+35ubuntu6                            all          GD module for PHP [default]
ii  php-gettext                    1.0.11-2build1                             all          read gettext MO files directly, without requiring anything other than PHP
ii  php-memcache                   3.0.9~20151130.fdbd46b-2                   amd64        memcache extension module for PHP5
ii  php-memcached                  2.2.0-51-ge573a6e+2.2.0-2build2            amd64        memcached extension module for PHP5, uses libmemcached
ii  php-mysql                      1:7.0+35ubuntu6                            all          MySQL module for PHP [default]
ii  php-pear                       1:1.10.1+submodules+notgz-6                all          PEAR Base System
ii  php-phpseclib                  2.0.1-1build1                              all          implementations of an arbitrary-precision integer arithmetic library
ii  php-rrd                        2.0.0+1.1.3-3                              amd64        PHP bindings to rrd tool system
ii  php-tcpdf                      6.0.093+dfsg-1ubuntu1                      all          PHP class for generating PDF files on-the-fly
ii  php-zip                        1:7.0+35ubuntu6                            all          Zip module for PHP [default]
ii  php7.0                         7.0.22-0ubuntu0.16.04.1                    all          server-side, HTML-embedded scripting language (metapackage)
ii  php7.0-bcmath                  7.0.22-0ubuntu0.16.04.1                    amd64        Bcmath module for PHP
ii  php7.0-cgi                     7.0.22-0ubuntu0.16.04.1                    amd64        server-side, HTML-embedded scripting language (CGI binary)
ii  php7.0-cli                     7.0.22-0ubuntu0.16.04.1                    amd64        command-line interpreter for the PHP scripting language
ii  php7.0-common                  7.0.22-0ubuntu0.16.04.1                    amd64        documentation, examples and common module for PHP
ii  php7.0-curl                    7.0.22-0ubuntu0.16.04.1                    amd64        CURL module for PHP
ii  php7.0-gd                      7.0.22-0ubuntu0.16.04.1                    amd64        GD module for PHP
ii  php7.0-intl                    7.0.22-0ubuntu0.16.04.1                    amd64        Internationalisation module for PHP
ii  php7.0-json                    7.0.22-0ubuntu0.16.04.1                    amd64        JSON module for PHP
ii  php7.0-mbstring                7.0.22-0ubuntu0.16.04.1                    amd64        MBSTRING module for PHP
ii  php7.0-mcrypt                  7.0.22-0ubuntu0.16.04.1                    amd64        libmcrypt module for PHP
ii  php7.0-mysql                   7.0.22-0ubuntu0.16.04.1                    amd64        MySQL module for PHP
ii  php7.0-opcache                 7.0.22-0ubuntu0.16.04.1                    amd64        Zend OpCache module for PHP
ii  php7.0-readline                7.0.22-0ubuntu0.16.04.1                    amd64        readline module for PHP
ii  php7.0-snmp                    7.0.22-0ubuntu0.16.04.1                    amd64        SNMP module for PHP
ii  php7.0-xml                     7.0.22-0ubuntu0.16.04.1                    amd64        DOM, SimpleXML, WDDX, XML, and XSL module for PHP
ii  php7.0-zip                     7.0.22-0ubuntu0.16.04.1                    amd64        Zip module for PHP
ii  phpmyadmin                     4:4.5.4.1-2ubuntu2                         all          MySQL web administration tool
CONFIGURATION
root@ixpm:/srv/ixpmanager# cat .env | egrep -v '(^#|^\s*$|^DB_|^APP_KEY|^HELPDESK|^IDENTITY|^MAIL_|^IXP_API_RIR_PASSWORD|^IXP_API_PEERING_DB_)'
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL="https://ixpm.stl.midwest-ix.com"
APP_TIMEZONE="America/Chicago"
APP_LOG="single"
IXP_API_JSONEXPORTSCHEMA_PUBLIC=true
IXP_MULTIIXP_ENABLED=false
IXP_RESELLER_ENABLED=true
reseller.no_billing_for_resold_customers = false
IXP_AS112_UI_ACTIVE=true
GRAPHER_BACKENDS="mrtg"
GRAPHER_BACKEND_MRTG_DBTYPE="log"
GRAPHER_BACKEND_MRTG_WORKDIR="/srv/mrtg"
GRAPHER_BACKEND_MRTG_LOGDIR="/srv/mrtg"
VIEW_SMARTY_SKIN="M-IX"
AUTH_ZF1_PWHASH="bcrypt"
CACHE_DRIVER=memcached
SESSION_DRIVER=file
DOCTRINE_PROXY_AUTOGENERATE=true
DOCTRINE_CACHE=memcached
DOCTRINE_CACHE_NAMESPACE=IXPMANAGERNAMESPACE
SUMMARY

MRTG wasn't producing any graphs for new switches we added and aggregate graphs were all kinds of jacked up. Some investigation ensued.

MRTG doesn't like @ symbols in communities. IXP Manager has no problem with it elsewhere.

STEPS TO REPRODUCE

Add a switch with an @ symbol in the community. Watch MRTG.

EXPECTED RESULTS

Normal MRTG graphs.

ACTUAL RESULTS

Member graphs were blank and aggregate graphs were jacked up.

IMPORTANCE

Yes, but in the short term I can work around it in changing the community used.

barryo commented 6 years ago

Thanks @MHammett. For some reason I thought we fixed this a long time ago. Could have gotten lost in the move to Grapher 🤷‍♂️