The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Feature #4908

need a total resource metric that does not include default resources (schedules/filebucket)

Added by Dan Bode almost 4 years ago. Updated about 3 years ago.

Status:InvestigatingStart date:10/01/2010
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:reports
Target version:-
Affected Puppet version:2.6.0 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


Description

I have always found it confusing that the Total metric for resources is not the same as the number of resources that a user declares. Now that all of the resources are listed in the reports I can see that

Total = (number of resources I am managing) + (default resources I dont care about)

Consider the following code:

node default {
  file { '/tmp/two':
    content => 'blah2',
  }
  notify { $hostname:}
  #include test
}

here is the resource metric

    resources: !ruby/object:Puppet::Util::Metric
      label: Resources
      name: resources
      values:
        - - !ruby/sym out_of_sync
          - Out of sync
          - 1
        - - !ruby/sym total
          - Total
          - 9
        - - !ruby/sym changed
          - Changed
          - 1

Total in this case has 7 extra resources.

The resources are:

Schedule[weekly]
Filebucket[puppet]
Notify[puppetmaster]
File[/tmp/two]
Schedule[daily]
Schedule[hourly]
Schedule[puppet]
Schedule[monthly]
Schedule[never]

Most of these resources are defaults that I did not declare.

It would be nice to differentiate between resources declared (or even used) vs. these default internal resources.

History

#1 Updated by Nigel Kersten almost 4 years ago

My inclination is that the default internal resources shouldn’t count at all unless used. This has always bugged me too.

Does the FileBucket show up regardless of whether that file resource is being backed up?

#2 Updated by Nigel Kersten almost 4 years ago

  • Status changed from Unreviewed to Investigating

#3 Updated by Dan Bode almost 4 years ago

filebucket shows up even when it is not used (or at least explicitly used)

Also available in: Atom PDF