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

Documentation for collectd::plugin::ping, needed to use class #841

Closed
pckizer opened this issue Aug 3, 2018 · 1 comment · Fixed by #843
Closed

Documentation for collectd::plugin::ping, needed to use class #841

pckizer opened this issue Aug 3, 2018 · 1 comment · Fixed by #843
Labels
docs Improvements or additions to documentation

Comments

@pckizer
Copy link
Contributor

pckizer commented Aug 3, 2018

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.3.6 [via PE 2017.3.6]
  • Ruby: ruby 2.4.4p296 (2018-03-28 revision 63013) [x86_64-linux]
  • Distribution: Oracle Linux Server release 7.5
  • Module version: mod 'puppet-collectd', '10.0.1'

How to reproduce (e.g Puppet code you use)

Took the sample collectd::plugin::ping config section from README at https://forge.puppet.com/puppet/collectd/readme#class-collectdpluginping that suggests:

Class: collectd::plugin::ping
collectd::plugin::ping {
'example':
hosts => ['example.com'],
}

and put into my manifest like:

  collectd::plugin::ping {
    'uplink':
      hosts => ['defaultrouter','uplink-ip','8.8.8.8'],
  }

What are you seeing

In the configured code above, the 'collectd::plugin::ping' line is line 14:

Jul 30 16:54:42 host puppet-agent[121351]: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Unknown resource type: 'collectd::plugin::ping' (file: /etc/puppetlabs/code/environments/testing/site/profile/manifests/software/collectd.pp, line: 14, column: 7) on node host

What behaviour did you expect instead

Expected "puppet-agent: Applied catalog in 4.68 seconds"

Output log

sed -ne 103135,103139p /var/log/messages | sed -e 's/to-munge/site-related-info/'

Jul 30 16:54:38 host puppet-agent[121351]: Using configured environment 'testing'
Jul 30 16:54:38 host puppet-agent[121351]: Retrieving pluginfacts
Jul 30 16:54:38 host puppet-agent[121351]: Retrieving plugin
Jul 30 16:54:39 host puppet-agent[121351]: Loading facts
Jul 30 16:54:42 host puppet-agent[121351]: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Unknown resource type: 'collectd::plugin::ping' (file: /etc/puppetlabs/code/environments/testing/site/profile/manifests/software/collectd.pp, line: 14, column: 7) on node host.subnet.local

Any additional information you'd like to impart

Changing my manifest to look like the following succeeded and began the monitoring correctly:

  class { 'collectd::plugin::ping':
    hosts => ['defaultrouter','uplink-ip','8.8.8.8'],
  }

After changing the manifest as described above I did get:

sed -ne 103503,103560p /var/log/messages | sed -e 's/to-munge/site-related-info/' | grep puppet-agent

Jul 30 17:02:52 host puppet-agent[21904]: Using configured environment 'testing'
Jul 30 17:02:52 host puppet-agent[21904]: Retrieving pluginfacts
Jul 30 17:02:52 host puppet-agent[21904]: Retrieving plugin
Jul 30 17:02:53 host puppet-agent[21904]: Loading facts
Jul 30 17:02:59 host puppet-agent[21904]: Caching catalog for host.subnet.local
Jul 30 17:03:00 host puppet-agent[21904]: Applying configuration version '70401419ab16394f5c0fbd3569e708a4bd4b0bee'
Jul 30 17:03:03 host puppet-agent[21904]: (/Stage[main]/Collectd::Plugin::Ping/Collectd::Plugin[ping]/File[ping.load]/ensure) defined content as '{md5}32f98a999315087a76f24b359d3d78d4'
Jul 30 17:03:03 host puppet-agent[21904]: (/Stage[main]/Collectd::Plugin::Ping/Collectd::Plugin[ping]/File[ping.load]) Scheduling refresh of Service[collectd]
Jul 30 17:03:04 host puppet-agent[21904]: (/Stage[main]/Collectd::Service/Service[collectd]) Triggered 'refresh' from 1 events
Jul 30 17:03:05 host puppet-agent[21904]: Applied catalog in 4.96 seconds

which successfully performed the pings specified in the config.

I do have an upgrade planned, but unless this is a manifest grammar change I cannot find in the release notes for 2017.3.9 or 2018.1.3 then I am merely suggesting the readme be updated as above. Should I create the trivial pull request for it? I'm ready to click "Create" on one if so.

@bastelfreak
Copy link
Member

hey @pckizer, thanks for bringing up this issue. Can you please create a PR for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
3 participants