Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yo-yo effect using genericjmx #274

Closed
jlyheden opened this issue Jun 15, 2015 · 4 comments
Closed

Yo-yo effect using genericjmx #274

jlyheden opened this issue Jun 15, 2015 · 4 comments

Comments

@jlyheden
Copy link

First puppet run creates the genericjmx resources, second removes it and so it continues into infinity.

First run:

[root@vagrant ~]# puppet apply --verbose --modulepath=/tmp/vagrant-puppet-1/modules-0 /tmp/vagrant-puppet-1/manifests/site.pp
Info: Loading facts
Info: Loading facts
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Notice: Compiled catalog for vagrant.swe1.unibet.com in environment production in 1.90 seconds
Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false.
   (at /usr/lib/ruby/site_ruby/1.8/puppet/type/package.rb:430:in `default')
Info: Applying configuration version '1434373462'
Notice: /Stage[main]/Collectd::Plugin::Genericjmx/Concat[/etc/collectd.d/15-genericjmx.conf]/File[/etc/collectd.d/15-genericjmx.conf]/ensure: defined content as '{md5}a5592d5f304a154b01c46e66f6761a67'
Info: Concat[/etc/collectd.d/15-genericjmx.conf]: Scheduling refresh of Service[collectd]
Notice: /Stage[main]/Collectd/Service[collectd]: Triggered 'refresh' from 1 events
Notice: Finished catalog run in 0.64 seconds

Second run:

[root@vagrant ~]# puppet apply --verbose --modulepath=/tmp/vagrant-puppet-1/modules-0 /tmp/vagrant-puppet-1/manifests/site.pp
Info: Loading facts
Info: Loading facts
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Notice: Compiled catalog for vagrant.swe1.unibet.com in environment production in 1.79 seconds
Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false.
   (at /usr/lib/ruby/site_ruby/1.8/puppet/type/package.rb:430:in `default')
Info: Applying configuration version '1434373468'
Info: Computing checksum on file /etc/collectd.d/15-genericjmx.conf
Info: FileBucket got a duplicate file {md5}a5592d5f304a154b01c46e66f6761a67
Info: /Stage[main]/Collectd/File[/etc/collectd.d/15-genericjmx.conf]: Filebucketed /etc/collectd.d/15-genericjmx.conf to puppet with sum a5592d5f304a154b01c46e66f6761a67
Notice: /Stage[main]/Collectd/File[/etc/collectd.d/15-genericjmx.conf]/ensure: removed
Info: collectd.d: Scheduling refresh of Service[collectd]
Notice: /Stage[main]/Collectd/Service[collectd]: Triggered 'refresh' from 1 events
Warning: collectd.d: appears to have a negative number of dependencies
Warning: /etc/collectd.d/15-genericjmx.conf: appears to have a negative number of dependencies
Warning: Concat[/etc/collectd.d/15-genericjmx.conf]: appears to have a negative number of dependencies
Warning: /Stage[main]/Collectd/Service[collectd]: appears to have a negative number of dependencies
Warning: Class[Collectd::Plugin::Genericjmx]: appears to have a negative number of dependencies
Notice: /Stage[main]/Collectd/Service[collectd]: Triggered 'refresh' from 1 events
Warning: Class[Collectd]: appears to have a negative number of dependencies
Info: collectd.d: Scheduling refresh of Service[collectd]
Warning: /Stage[main]/Collectd::Plugin::Java/Collectd::Plugin[java]/File[older_java.load]: appears to have a negative number of dependencies
Warning: /Stage[main]/Collectd::Plugin::Write_graphite/Collectd::Plugin[write_graphite]/File[write_graphite.load]: appears to have a negative number of dependencies
Warning: /Stage[main]/Collectd::Plugin::Write_graphite/Collectd::Plugin[write_graphite]/File[old_write_graphite.load]: appears to have a negative number of dependencies
Warning: Class[Collectd]: appears to have a negative number of dependencies
Warning: /Stage[main]/Collectd/Service[collectd]: appears to have a negative number of dependencies
Warning: /Stage[main]/Collectd::Plugin::Java/Collectd::Plugin[java]/File[old_java.load]: appears to have a negative number of dependencies
Warning: /Stage[main]/Collectd::Plugin::Write_graphite/Collectd::Plugin[write_graphite]/File[older_write_graphite.load]: appears to have a negative number of dependencies
Warning: /Stage[main]/Collectd::Plugin::Java/Collectd::Plugin[java]/File[java.load]: appears to have a negative number of dependencies
Warning: /Stage[main]/Collectd/Service[collectd]: appears to have a negative number of dependencies
Warning: Collectd::Plugin[write_graphite]: appears to have a negative number of dependencies
Notice: /Stage[main]/Collectd/Service[collectd]: Triggered 'refresh' from 2 events
Warning: Class[Collectd]: appears to have a negative number of dependencies
Warning: /Stage[main]/Collectd/Service[collectd]: appears to have a negative number of dependencies
Warning: Collectd::Plugin[write_graphite]: appears to have a negative number of dependencies
Notice: /Stage[main]/Collectd/Service[collectd]: Triggered 'refresh' from 2 events
Warning: Class[Collectd]: appears to have a negative number of dependencies
Warning: /Stage[main]/Collectd/Service[collectd]: appears to have a negative number of dependencies
Warning: Collectd::Plugin[java]: appears to have a negative number of dependencies
Notice: /Stage[main]/Collectd/Service[collectd]: Triggered 'refresh' from 2 events
Warning: Class[Collectd]: appears to have a negative number of dependencies
Warning: Class[Collectd::Plugin::Java]: appears to have a negative number of dependencies
Warning: /Stage[main]/Collectd/Service[collectd]: appears to have a negative number of dependencies
Warning: Collectd::Plugin[java]: appears to have a negative number of dependencies
Notice: /Stage[main]/Collectd/Service[collectd]: Triggered 'refresh' from 2 events
Warning: Class[Collectd]: appears to have a negative number of dependencies
Warning: Class[Collectd::Plugin::Java]: appears to have a negative number of dependencies
Warning: /Stage[main]/Collectd/Service[collectd]: appears to have a negative number of dependencies
Warning: Collectd::Plugin[java]: appears to have a negative number of dependencies
Notice: /Stage[main]/Collectd/Service[collectd]: Triggered 'refresh' from 2 events
Warning: Class[Collectd]: appears to have a negative number of dependencies
Warning: Class[Collectd::Plugin::Java]: appears to have a negative number of dependencies
Warning: /Stage[main]/Collectd/Service[collectd]: appears to have a negative number of dependencies
Warning: Collectd::Plugin[write_graphite]: appears to have a negative number of dependencies
Notice: /Stage[main]/Collectd/Service[collectd]: Triggered 'refresh' from 2 events
Warning: Class[Collectd]: appears to have a negative number of dependencies
Warning: Stage[main]: appears to have a negative number of dependencies
Warning: Class[Collectd::Plugin::Write_graphite]: appears to have a negative number of dependencies
Warning: Stage[main]: appears to have a negative number of dependencies
Warning: Stage[main]: appears to have a negative number of dependencies
Notice: Finished catalog run in 2.47 seconds

Manifest:

class { '::collectd':
  purge        => true,
  recurse      => true,
  purge_config => true,
}

class { 'collectd::plugin::write_graphite':
  graphitehost => 'influxdb',
}

include collectd::plugin::genericjmx

collectd::plugin::genericjmx::mbean {
  'garbage_collector':
    object_name     => 'java.lang:type=GarbageCollector,*',
    instance_prefix => 'gc-',
    instance_from   => 'name',
    values          => [
      {
        type      => 'invocations',
        table     => false,
        attribute => 'CollectionCount',
      },
      {
        type            => 'total_time_in_ms',
        instance_prefix => 'collection_time',
        table           => false,
        attribute       => 'CollectionTime',
      },
    ];
}

collectd::plugin::genericjmx::mbean {
  'memory-heap':
    object_name => 'java.lang:type=Memory',
    instance_prefix => 'memory-heap',
    values          => [
      {
        type          => 'jmx_memory',
        table         => true,
        attribute     => 'HeapMemoryUsage'
      }
    ]
}

collectd::plugin::genericjmx::mbean {
  'memory-nonheap':
    object_name => 'java.lang:type=Memory',
    instance_prefix => 'memory-nonheap',
    values          => [
      {
        type          => 'jmx_memory',
        table         => true,
        attribute     => 'NonHeapMemoryUsage'
      }
    ]
}

collectd::plugin::genericjmx::mbean {
  'memory-permgen':
    object_name => 'java.lang:type=MemoryPool,name=*Perm Gen',
    instance_prefix => 'memory-permgen',
    values  => [
      {
        type  => 'jmx_memory',
        table => true,
        attribute => "Usage"
      }
    ]
}

collectd::plugin::genericjmx::mbean {
  'websessions':
    object_name => 'amx:pp=/mon/server-mon[server],type=session-mon,name=web/session',
    instance_prefix => 'websessions',
    values => [
      {
        table     => false,
        instance_prefix => 'sessionstotal',
        attribute => 'sessionstotal.count',
        type      => 'counter'
      },
      {
        table => false,
        instance_prefix => 'activesessionscurrent',
        attribute => 'activesessionscurrent.current',
        type => 'current_sessions'
      },
      {
        table => false,
        instance_prefix => 'expiredsessionstotal',
        attribute => 'expiredsessionstotal.count',
        type => 'counter'
      },
      {
        table => false,
        instance_prefix => 'persistedsessionstotal',
        attribute => 'persistedsessionstotal.count',
        type => 'counter'
      },
      {
        table => false,
        instance_prefix => 'rejectedsessionstotal',
        attribute => 'rejectedsessionstotal.count',
        type => 'counter'
      },
      {
        table => false,
        instance_prefix => 'activatedsessionstotal',
        attribute => 'activatedsessionstotal.count',
        type => 'counter'
      },
      {
        table => false,
        instance_prefix => 'passivatedsessionstotal',
        attribute => 'passivatedsessionstotal.count',
        type => 'counter'
      }
    ]
}

collectd::plugin::genericjmx::connection {
  'java_app':
    host            => $fqdn,
    service_url     => 'service:jmx:rmi:///jndi/rmi://localhost:11286/jmxrmi',
    collect         => [ 'memory-heap', 'memory-nonheap','garbage_collector', 'memory-permgen', 'sessions' ],
    instance_prefix => 'myapp.',
    user            => '***',
    password        => '***'
}

Puppet version: 3.7.1
Puppet modules:

[root@vagrant ~]# puppet module list --modulepath /tmp/vagrant-puppet-1/modules-0
/tmp/vagrant-puppet-1/modules-0
├── jdowning-statsd (v2.4.0)
├── pdxcat-collectd (v3.3.0)
├── puppetlabs-concat (v2.0.0)
├── puppetlabs-stdlib (v4.6.0)
└── stahnma-epel (v1.0.2)
@mefjush
Copy link

mefjush commented Aug 14, 2015

Did you find a way to bypass this problem? I've got the same issue.

@igalic
Copy link
Contributor

igalic commented Sep 28, 2015

this is really confusing because of all the warnings you're getting there. From what i gather, that is caused by concat 2.0.0. Would you mind upgrading to 2.0.1?

also, could you two please try setting ensure => present on the concat resource in this class:
https://github.com/puppet-community/puppet-collectd/blob/master/manifests/plugin/genericjmx.pp ?

@jlyheden
Copy link
Author

Downgrading to concat 1.2.4 fixed the yo-yo issue, apparently concat 2.0.0 and 2.0.1 has been deleted from the Forge so some serious issues with that major version..

@igalic
Copy link
Contributor

igalic commented Sep 29, 2015

\o/

awesome. noted. closing this issue.

@igalic igalic closed this as completed Sep 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants