Ticket #882 (closed defect: duplicate)

Opened 2 years ago

Last modified 1 week ago

munin_get_keypath fails when fieldname is root

Reported by: wiktorn Assigned to: nobody
Priority: normal Milestone: Munin 2.0
Component: master Version: 1.4.3
Severity: normal Keywords:
Cc:

Description

I'm using standard df plugin, and one of the filesystems is named "root".

This makes munin_get_keypath fail and thus, munin-graph can't find a proper file: 2010/03/06 16:34:09 [DEBUG] RRD name / filename: root / /usr/local/var/munin/--g.rrd

Though it is strange, that munin-update doesn't complain: 2010/03/06 16:48:20 [DEBUG] Made rrd filename: /usr/local/var/munin/kadlubek/kadlubek-df-root_usr-g.rrd.

I guess that's because munin update uses following way of composing filename:

    my $file = sprintf("%s-%s-%s-%s.rrd",
                       $path,
                       $service,
                       $ds_name,
                       $type_id);

And munin-graph the following one:

 $filename = munin_get_rrd_filename($field, $path);

And munin_get_rrd_filename calls munin_get_filename, which calls munin_get_keypath, which has a line (923 in Utils.pm - http://munin.projects.linpro.no/browser/trunk/master/lib/Munin/Master/Utils.pm?rev=3236#L923):

 last if $name eq 'root';

Commenting this line is not a solution, as it will break other filename creation.

As a workaround I have set filepath on this field in munin.conf: df.root.filename /usr/local/var/munin/kadlubek/kadlubek-df-root-g.rrd

Change History

01/31/12 15:28:09 changed by snide

  • status changed from new to closed.
  • resolution set to duplicate.
  • milestone changed from Munin 1.4.4 to Munin 2.0.

This is actually followed by ticket #921