sensu-plugin and "cannot load such file -- mkmf (LoadError)"

Hi,

I am following the instruction here http://sensuapp.org/docs/0.16/adding_a_check to run

gem install sensu-plugin --no-rdoc --no-ri

However I’m getting an error message:

$ sudo gem install sensu-plugin --no-rdoc --no-ri

Fetching: json-1.8.2.gem (100%)

Building native extensions. This could take a while…

ERROR: Error installing sensu-plugin:

    ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.9.1 extconf.rb

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’: cannot load such file – mkmf (LoadError)

    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

    from extconf.rb:1:in `<main>'

The system is ubunut 14.04

I have a couple of questions:

  1. An omnibus package is mentioned a lot in the forum, however I am not able to locate in apt repos. Can I install it via apt-get?

  2. How can I automate the ‘gem install’ command in chef?

  3. Why I am getting a mkmf Load error?

  4. What is the purpose of the sensu-plugin?

Thanks, Tony

  1. An omnibus package is mentioned a lot in the forum, however I am not able to locate in apt repos. Can I install it via apt-get?

Most of the packages are installed using apt-get ; its an easy way.

For more details on apt-get check ( How apt-get works ?)

sudo apt-get install ruby gem

···

On Wednesday, February 25, 2015 at 12:03:36 PM UTC-5, Anthony Kong wrote:

Hi,

I am following the instruction here http://sensuapp.org/docs/0.16/adding_a_check to run

gem install sensu-plugin --no-rdoc --no-ri

However I’m getting an error message:

$ sudo gem install sensu-plugin --no-rdoc --no-ri

Fetching: json-1.8.2.gem (100%)

Building native extensions. This could take a while…

ERROR: Error installing sensu-plugin:

    ERROR: Failed to build gem native extension.
    /usr/bin/ruby1.9.1 extconf.rb

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’: cannot load such file – mkmf (LoadError)

    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from extconf.rb:1:in `<main>'

The system is ubunut 14.04

I have a couple of questions:

  1. An omnibus package is mentioned a lot in the forum, however I am not able to locate in apt repos. Can I install it via apt-get?
  1. How can I automate the ‘gem install’ command in chef?
  1. Why I am getting a mkmf Load error?
  1. What is the purpose of the sensu-plugin?

Thanks, Tony

Hi max2su,

I know how to use apt-get. My question is more about if there is a special package by the name of sensu-omnibus or similar because I have seen omnibus mentioned a few in other posts.

Thanks

1.) According to: http://sensuapp.org/docs/0.16/packages

“The Sensu project provides “omnibus” packages, which contain all of the Sensu components, and have no dependencies. The packages are self-contained, having everything Sensu needs to run, with the exception of RabbitMQ and Redis. This ensures the simplest installation process, promotes consistency across installs, and prevents Sensu from interfering with other applications. On Linux platforms, the packages install to /opt/sensu, and place sysvinit scripts in /etc/init.d.”

That page goes on to detail adding the repositories and installing the ‘sensu’ package depending on the distro (in your case Ubuntu).

4.) The sensu-plugin “has various helper classes used by many of the community plugins:” Off the top of my head, the ‘refresh’ check definition requires the sensu-plugin to work.

Sorry I can’t comment on the other two.

···

Leland

On Wednesday, February 25, 2015 at 3:55:23 PM UTC-5, Anthony Kong wrote:

Hi max2su,

I know how to use apt-get. My question is more about if there is a special package by the name of sensu-omnibus or similar because I have seen omnibus mentioned a few in other posts.

Thanks