Skip to content
This repository has been archived by the owner on Jun 13, 2020. It is now read-only.

Only works with chef #19

Open
hco opened this issue Jun 16, 2014 · 5 comments
Open

Only works with chef #19

hco opened this issue Jun 16, 2014 · 5 comments

Comments

@hco
Copy link

hco commented Jun 16, 2014

From what I understand (and I don't understand ruby ;)) this currently kinda depends on chef, as https://github.com/etsy/nagios-herald/blob/master/lib/nagios-herald/helpers/ganglia_graph.rb#L1 includes some chef code.

This should be clarified in the documentation or changed.

Without chef being installed it results in the following:

3G icinga@icinga err: 130 ~ # /opt/nagios-herald/bin/nagios-herald  --help
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- chef/search/query (LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /opt/nagios-herald/lib/nagios-herald/helpers/ganglia_graph.rb:1:in `<top (required)>'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /opt/nagios-herald/lib/nagios-herald/helpers.rb:1:in `<top (required)>'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /opt/nagios-herald/lib/nagios-herald.rb:7:in `<top (required)>'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /opt/nagios-herald/bin/nagios-herald:3:in `<main>'
@bond-os
Copy link

bond-os commented Jun 17, 2014

Also, after installing chef (gem install chef), it doesnt work because of mismatched gem versions

/usr/lib/ruby/1.9.1/rubygems/specification.rb:1637:in `raise_if_conflicts': Unable to activate chef-11.12.8, because mime-types-2.3 conflicts with mime-types (~> 1.16) (Gem::LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/specification.rb:746:in `activate'
    from /usr/lib/ruby/1.9.1/rubygems.rb:212:in `rescue in try_activate'
    from /usr/lib/ruby/1.9.1/rubygems.rb:209:in `try_activate'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from /home/bernard/nagios-herald/lib/nagios-herald/helpers/ganglia_graph.rb:1:in `<top (required)>'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/bernard/nagios-herald/lib/nagios-herald/helpers.rb:1:in `<top (required)>'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/bernard/nagios-herald/lib/nagios-herald.rb:7:in `<top (required)>'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from ./nagios-herald:3:in `<main>'

@RyanFrantz
Copy link
Contributor

Hmm, this is a vestige of some internal bits I'd mostly culled. I can remove the Chef dependency and replace it with something more generic that others can build on. Also, if you have any code you'd like to submit that does that, I'd love to see it.

@kargig
Copy link

kargig commented Jun 23, 2014

I guess one can comment out 'unneeded' helpers in lib/nagios-herald/helpers.rb, right ?

@RyanFrantz
Copy link
Contributor

Per #22, I'll modify this helper to be smarter about requiring Chef support and fall back to a simpler mechanism to look up the cluster name.

@nkammah
Copy link
Contributor

nkammah commented Oct 7, 2015

@RyanFrantz I ran into similar issues whereby I did not install the chef gem (that requires ruby 2.0 btw which I did not want to muck on) - one of the commit in #36 fixes the import issue, but not the underlying mechanism of the ganglia_graph helper. I also have not removed the dependency in the gemspec - I am not sure yet what would be the best approach to manage that gem since it could be an optional gem based on every user situation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants