Resuming Operations

After a three year stint with VoIP operations we're back to focusing on netflow-based monitoring.

So, the first thing I noticed is that recent versions of Perl have affected the operation of FlowViewer. Version 5.26 in particular has eliminated the current directory (.) from the default @INC array. FlowViewer depended on this to provide access to the common modules, FlowViewer_Configuration.pm, FlowViewer_Utilities.pm and FlowViewer_UI.pm. FlowViewer installations using Perl v 5.26 or later will simply fail (e.g., see /var/log/apache2/error.log).

There is a simple fix which requires moving those common files into an acceptable, secure, directory already available to @INC. Such directories can be found from the command prompt like this:

flowviewer@whiterose1:/var/www/cgi-bin/FlowViewer_4.6$ perl -V
@INC:
/etc/perl
/usr/local/lib/x86_64-linux-gnu/perl/5.26.1
/usr/local/share/perl/5.26.1
/usr/lib/x86_64-linux-gnu/perl5/5.26
/usr/share/perl5
/usr/lib/x86_64-linux-gnu/perl/5.26
/usr/share/perl/5.26
/usr/local/lib/site_perl
/usr/lib/x86_64-linux-gnu/perl-base

I have moved the common files mentioned above into /usr/share/perl5 and created softlinks in the main CGI directory to point to them like this:


lrwxrwxrwx 1 flowviewer flowviewer 44 Oct 19 17:16 FlowViewer_Configuration.pm -> /usr/share/perl5/FlowViewer_Configuration.pm*
lrwxrwxrwx 1 flowviewer flowviewer 33 Oct 19 17:17 FlowViewer_UI.pm -> /usr/share/perl5/FlowViewer_UI.pm*
lrwxrwxrwx 1 flowviewer flowviewer 40 Oct 19 17:16 FlowViewer_Utilities.pm -> /usr/share/perl5/FlowViewer_Utilities.pm*

3 thoughts on “Resuming Operations”

  1. Adding “use lib ‘./’;” before any other use statement in each of the cgi scripts restores the behavior to the way it was before Perl 5.26 without moving any files out of the flowviewer directory.

    Welcome back!

  2. Thanks David. Sounds very good. The problem has popped up in various ways over the years. I’ll check it out. Any security issues you’re aware of?

  3. Now, we have to build the directories used by FlowViewer and, of course, we have to set the needed permissions on them. Once you defined some trackings in FlowTracker they constantly grab data from flow-capture files, store them in RRD databases and build graphs, like MRTG does with SNMP data.

Leave a Reply to Joe Cancel reply

Your email address will not be published.