Page 2 of 2
Re: AWS CloudWatch Plugin for Nagios XI
Posted: Mon Jan 26, 2015 10:55 pm
by swapnil.kadam
Please find attached output from the command
Re: AWS CloudWatch Plugin for Nagios XI
Posted: Tue Jan 27, 2015 12:04 pm
by lgroschen
I think the require 'rubygems' in your check_cloudwatch_status is the issue. I had this problem using ruby modules, but it was the 'rubygems' that fixed a require dependancy. Are you certain you have the gem that this file is referring to installed?
Re: AWS CloudWatch Plugin for Nagios XI
Posted: Tue Jan 27, 2015 2:30 pm
by swapnil.kadam
Please find below details, because even after installing rubygems the problem persist.
[root@ip-10-1-252-182 hosts]# yum install rubygems
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink | 26 kB 00:00
* base: ftp.heanet.ie
* epel: ftp.heanet.ie
* extras: ftp.heanet.ie
* rpmforge: ftp.heanet.ie
* updates: ftp.heanet.ie
base | 3.7 kB 00:00
cr | 3.3 kB 00:00
epel | 4.4 kB 00:00
epel/primary_db | 6.3 MB 00:00
extras | 3.4 kB 00:00
rpmforge | 1.9 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 1.5 MB 00:00
Resolving Dependencies
--> Running transaction check
---> Package rubygems.noarch 0:1.3.7-5.el6 will be installed
--> Processing Dependency: ruby-rdoc for package: rubygems-1.3.7-5.el6.noarch
--> Running transaction check
---> Package ruby-rdoc.x86_64 0:1.8.7.374-3.el6_6 will be installed
--> Processing Dependency: ruby-irb = 1.8.7.374-3.el6_6 for package: ruby-rdoc-1.8.7.374-3.el6_6.x86_64
--> Running transaction check
---> Package ruby-irb.x86_64 0:1.8.7.374-3.el6_6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================
Installing:
rubygems noarch 1.3.7-5.el6 base 207 k
Installing for dependencies:
ruby-irb x86_64 1.8.7.374-3.el6_6 updates 317 k
ruby-rdoc x86_64 1.8.7.374-3.el6_6 updates 380 k
Transaction Summary
========================================================================================================================================
Install 3 Package(s)
Total download size: 904 k
Installed size: 3.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): ruby-irb-1.8.7.374-3.el6_6.x86_64.rpm | 317 kB 00:00
(2/3): ruby-rdoc-1.8.7.374-3.el6_6.x86_64.rpm | 380 kB 00:00
(3/3): rubygems-1.3.7-5.el6.noarch.rpm | 207 kB 00:00
----------------------------------------------------------------------------------------------------------------------------------------
Total 3.0 MB/s | 904 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : ruby-irb-1.8.7.374-3.el6_6.x86_64 1/3
Installing : ruby-rdoc-1.8.7.374-3.el6_6.x86_64 2/3
Installing : rubygems-1.3.7-5.el6.noarch 3/3
Verifying : ruby-irb-1.8.7.374-3.el6_6.x86_64 1/3
Verifying : ruby-rdoc-1.8.7.374-3.el6_6.x86_64 2/3
Verifying : rubygems-1.3.7-5.el6.noarch 3/3
Installed:
rubygems.noarch 0:1.3.7-5.el6
Dependency Installed:
ruby-irb.x86_64 0:1.8.7.374-3.el6_6 ruby-rdoc.x86_64 0:1.8.7.374-3.el6_6
Complete!
[root@ip-10-1-252-182 hosts]#
Re: AWS CloudWatch Plugin for Nagios XI
Posted: Tue Jan 27, 2015 2:45 pm
by swapnil.kadam
[root@ip-10-1-252-182 rubygems-1.8.25]# yum install -y rubygems
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: ftp.heanet.ie
* epel: ftp.heanet.ie
* extras: ftp.heanet.ie
* rpmforge: ftp.heanet.ie
* updates: ftp.heanet.ie
Package rubygems-1.3.7-5.el6.noarch already installed and latest version
Nothing to do
[root@ip-10-1-252-182 rubygems-1.8.25]#
Re: AWS CloudWatch Plugin for Nagios XI
Posted: Tue Jan 27, 2015 3:18 pm
by swapnil.kadam
If I try to execute a command from the Nagios Server, I get the below error.
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- AWS (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /usr/local/nagios/libexec/check_cloudwatch_status.rb:12
from /usr/local/nagios/libexec/check_cloudwatch_status.rb:12:in `each'
from /usr/local/nagios/libexec/check_cloudwatch_status.rb:12
[root@ip-10-1-252-182 rubygems-1.8.25]#
Re: AWS CloudWatch Plugin for Nagios XI
Posted: Tue Jan 27, 2015 3:31 pm
by lgroschen
Run these commands in green, just for sanity:
[root@localhost snmp]#
irb -rpp
irb(main):001:0>
pp $LOAD_PATH
["/usr/lib/ruby/site_ruby/1.8",
"/usr/lib64/ruby/site_ruby/1.8",
"/usr/lib64/ruby/site_ruby/1.8/x86_64-linux",
"/usr/lib/ruby/site_ruby",
"/usr/lib64/ruby/site_ruby",
"/usr/lib64/site_ruby/1.8",
"/usr/lib64/site_ruby/1.8/x86_64-linux",
"/usr/lib64/site_ruby",
"/usr/lib/ruby/1.8",
"/usr/lib64/ruby/1.8",
"/usr/lib64/ruby/1.8/x86_64-linux",
"."]
=> nil
If this all prints out fine, try adding this gem from the linux command line:
Source:
https://rubygems.org/gems/aws
Re: AWS CloudWatch Plugin for Nagios XI
Posted: Tue Jan 27, 2015 3:56 pm
by swapnil.kadam
I already got the problem resolved by running the following command:
gem install CloudyScripts
mkdir /etc/cloutomate/
ssh-keygen -f /etc/cloutomate/cloutomate.pem
Enter blank passphrase
chown nagios:nagios cloutomate.pem
Thank you everyone for the response to my query.
Re: AWS CloudWatch Plugin for Nagios XI
Posted: Tue Jan 27, 2015 4:05 pm
by slansing
Awesome, thanks for letting us know.