#1218 closed defect (fixed)

problem with multigraph (disk) and munin-cgi-graph

Reported by: robertns Owned by: snide
Priority: normal Milestone: Munin 2.0.0
Component: web-interface Version: devel
Severity: normal Keywords: munin-cgi-graph
Cc:

Description

Have recently deployed munin-2.0-rc6 and am noticing a problem with munin-cgi-graph and the multigraph disk plugins where Linux LVM has been used on the node being monitored (we make heavy use of LVM here). When I try to drill-down to view (say) "diskstats_iops"" on an LVM filesystem, I get errors such as this in munin-cgi-graph.log:

2012/05/11 15:25:31 Starting munin-graph
2012/05/11 15:25:31 Request path is /Athena/hermes2/diskstats_iops/dm-2-week.png
2012/05/11 15:25:31 [PERL WARNING] Use of uninitialized value $dom in concatenation (.) or string at /usr/local/munin-2.0/www/cgi/munin-cgi-graph line 133.
2012/05/11 15:25:31 [PERL WARNING] Use of uninitialized value $host in concatenation (.) or string at /usr/local/munin-2.0/www/cgi/munin-cgi-graph line 133.
2012/05/11 15:25:31 [PERL WARNING] Use of uninitialized value $serv in concatenation (.) or string at /usr/local/munin-2.0/www/cgi/munin-cgi-graph line 133.
2012/05/11 15:25:31 [PERL WARNING] Use of uninitialized value $scale in concatenation (.) or string at /usr/local/munin-2.0/www/cgi/munin-cgi-graph line 133.
2012/05/11 15:25:31 asked for (, , , )
2012/05/11 15:25:31 [PERL WARNING] Use of uninitialized value $scale in pattern match (m//) at /usr/local/munin-2.0/www/cgi/munin-cgi-graph line 135.
2012/05/11 15:25:31 [WARNING] Request for graph without specifying domain. Bailing out.

I suspect that this regular expression match:

    my ($dom, $host, $serv, $scale) =
      $path =~ m#^/(.*)/([^/]+)/(\w+)-([\w=,]+)\.png#; ## avoid bug in vim

.. does not like the hyphen in the LVM volume name.

Result is obviously no graph displayed.

Change History (4)

comment:1 Changed at 2012-05-11T09:37:10+02:00 by kenyon

Hmm, I'm thinking that we can add "-" to the $serv capture group to fix this. Like so:

m#^/(.*)/([^/]+)/(\w+-)-([\w=,]+)\.png#;

comment:2 Changed at 2012-05-11T09:51:02+02:00 by kenyon

That won't work. I meant to make that a character class:

m#^/(.*)/([^/]+)/([\w-])-([\w=,]+)\.png#;

comment:3 Changed at 2012-05-11T10:49:33+02:00 by snide

  • Owner changed from nobody to snide
  • Status changed from new to assigned

comment:4 Changed at 2012-05-11T10:55:01+02:00 by snide

  • Resolution set to fixed
  • Status changed from assigned to closed

Yup, changed in r4853 to :

    my ($dom, $host, $serv, $scale) =
      $path =~ m#^/(.*)/([^/]+)/([\w-]+)-([\w=,]+)\.png#; ## avoid bug in vim

As you accidentally remove the multiple +. But thx.

Note: See TracTickets for help on using tickets.