Nagios UI can't run the plugin
Posted: Wed Oct 18, 2017 2:12 am
Hi,
I'm trying to get the AWS cloudwatch_status plugin to work and I've installed all the packages necessary for the plugin (ruby and the dependencies in this case).
I'm able to run the cloudwatch command from the the cli using 'root' and 'nagios' users. However, I coundn't get the plugin working in the UI.
When I run normally with either nagios or root user, it ruturns the status without any errors:
ruby /usr/local/nagios/libexec/check_cloudwatch_status.rb -a XXXXXXXX -i "i-XXXXXX" -C CPUUtilization -f /usr/local/nagios/etc/aws_credentials.cfg
But the same thing does not work in the Nagios UI:
Also checked with 'sudo -u nagios', doesn't work.
sudo -u nagios ruby /usr/local/nagios/libexec/check_cloudwatch_status.rb -a XXXXXXXX -i "i-XXXXXX" -C CPUUtilization -f /usr/local/nagios/etc/aws_credentials.cfg
I get the warning message in "Status Information" in the UI:
(No output on stdout) stderr: /usr/local/rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- fog (LoadError)
fog and fog-aws packages are installed and works well from the cli.
BR,
Sujan
I'm trying to get the AWS cloudwatch_status plugin to work and I've installed all the packages necessary for the plugin (ruby and the dependencies in this case).
I'm able to run the cloudwatch command from the the cli using 'root' and 'nagios' users. However, I coundn't get the plugin working in the UI.
When I run normally with either nagios or root user, it ruturns the status without any errors:
ruby /usr/local/nagios/libexec/check_cloudwatch_status.rb -a XXXXXXXX -i "i-XXXXXX" -C CPUUtilization -f /usr/local/nagios/etc/aws_credentials.cfg
But the same thing does not work in the Nagios UI:
Also checked with 'sudo -u nagios', doesn't work.
sudo -u nagios ruby /usr/local/nagios/libexec/check_cloudwatch_status.rb -a XXXXXXXX -i "i-XXXXXX" -C CPUUtilization -f /usr/local/nagios/etc/aws_credentials.cfg
I get the warning message in "Status Information" in the UI:
(No output on stdout) stderr: /usr/local/rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- fog (LoadError)
fog and fog-aws packages are installed and works well from the cli.
BR,
Sujan