Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 650810 - net-analyzer/mrtg-2.17.4-r1 is non-functional with >net-analyzer/rrdtool-1.4.8-r1
Summary: net-analyzer/mrtg-2.17.4-r1 is non-functional with >net-analyzer/rrdtool-1.4....
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-18 18:30 UTC by Phil Stracchino (Unix Ronin)
Modified: 2018-03-19 13:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Stracchino (Unix Ronin) 2018-03-18 18:30:15 UTC
With any stable or unstable net-analyzer/rrdtool >1.4.8-r1, mrtg-2.17.4 or 2.17.4-r1 fails to generate any graphs.  Apache logs the following error:

[Sun Mar 18 14:04:39.866602 2018] [cgi:error] [pid 19784:tid 140158795384576] [client 10.24.32.10:50654] AH01215: Undefined subroutine &RRDs::graph called at /var/www/mrtg/mrtg-rrd.cgi line 451.: /var/www/mrtg/mrtg-rrd.cgi, referer: https://www.caerllewys.net/mrtg2/

If net-analyzer/rrdtool is rolled back to 1.4.8-r1, mrtg works again.  It seems perhaps there is a problem with the export of RRDs::graph, or possibly with all of the exports from RRDs?
Comment 1 Phil Stracchino (Unix Ronin) 2018-03-18 18:44:52 UTC
Note:  mrtg still apparently *gathers and records* the data even when graphing is not working, it just fails to graph it.  When rrdtool is rolled back to a working version, there is no data gap.


Also, scratch the speculation about RRDs::graph not being exported correctly, because my own upswatch tool also used rrdtool, also calls RRDs::graph, and appears to work fine.  So I am mystified as to why mrtg thinks RRDs::graph is undefined.

mrtg usage:

	my @rv = RRDs::graph($file, '-s', "-$back", @local_args,
		@{$target->{args}}, "VRULE:$oldsec#ff0000",
		"VRULE:$seconds#ff0000", @local_args_end);

Fails.
upswatch usage:

    RRDs::graph($hourloadgraph,
                "--title",		"UPS Load (last 2 hours)",
                "--start",		time()-7200,
                "--lower-limit",	0,
                "--height",		300,
                "--x-grid",		"MINUTE:5:MINUTE:15:MINUTE:15:0:%R",
                "--right-axis",		"1:0",
                "--slope-mode",
                "DEF:load=$rrd_file:load:LAST",
                "CDEF:low=load,0,GE,load,0,IF",
                "CDEF:med=load,50,GE,load,0,IF",
                "CDEF:high=load,80,GE,load,0,IF",
                "CDEF:crit=load,100,GT,load,0,IF",
                "AREA:low#00FF00:Low (<50)",
                "AREA:med#00FFFF:Medium (<80)",
                "AREA:high#FFFF00:High (>80)",
                "AREA:crit#FF0000:Critical (>100)",
                "LINE1:load#000000") || upslog("$hourloadgraph update failed!\n");

Works.

Really not sure what's going on here.  The rrdtool version dependency makes it look like an rrdtool problem, but ... upswatch works whichever rrdtool version is installed, right up to ~1.7.0.  Which suggests it's an mrtg problem.
Comment 2 Phil Stracchino (Unix Ronin) 2018-03-18 18:59:59 UTC
Note:  Upstream issue #10 opened.
Comment 3 Phil Stracchino (Unix Ronin) 2018-03-19 13:25:48 UTC
PLEASE DISREGARD.  Upon closer examination I have realized that the problem is not with mrtg, it is with mrtg-rrd.cgi, which is NOT part of mrtg and is from a separate source.

(I still don't know why it's failing, but....  it's not a net-analyzer/mrtg problem.)